summaryrefslogtreecommitdiff
path: root/colors.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2021-01-18 13:42:55 -0500
committerChet Ramey <chet.ramey@case.edu>2021-01-18 13:42:55 -0500
commitcf3c762ecfff5b2f445647a0f1543693984a5540 (patch)
treee21eb36970a06b1d8a2df6a97a161da43410e136 /colors.c
parentc5ad6be530f5c1daf64a2d20df4baba9f6b57aa4 (diff)
Readline-8.1 distribution sources and documentationreadline-8.1
Diffstat (limited to 'colors.c')
-rw-r--r--colors.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/colors.c b/colors.c
index 53758e0..9e37527 100644
--- a/colors.c
+++ b/colors.c
@@ -2,7 +2,7 @@
Modified by Chet Ramey for Readline.
- Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015, 2017
+ Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015, 2017, 2019
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -32,6 +32,13 @@
#include "rlconf.h"
+#if defined __TANDEM
+# define _XOPEN_SOURCE_EXTENDED 1
+# define _TANDEM_SOURCE 1
+# include <sys/types.h>
+# include <sys/stat.h>
+#endif
+
#include <stdio.h>
#include "posixstat.h" // stat related macros (S_ISREG, ...)
@@ -175,7 +182,7 @@ _rl_print_color_indicator (const char *f)
if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL)
colored_filetype = C_MISSING;
- else if (linkok == 0 && S_ISLNK(mode) && _rl_color_indicator[C_ORPHAN].string != NULL)
+ else if (linkok == 0 && _rl_color_indicator[C_ORPHAN].string != NULL)
colored_filetype = C_ORPHAN; /* dangling symlink */
else if(stat_ok != 0)
{