changeset 17:bfdc4be2e482

GNU text utilities
author Jim Meyering <jim@meyering.net>
date Thu, 19 Nov 1992 20:51:13 +0000
parents f4f95ae402d1
children ae9487125494
files lib/regex.c lib/regex.h lib/strtol.c
diffstat 3 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -135,7 +135,11 @@
    (Per Bothner suggested the basic approach.)  */
 #undef SIGN_EXTEND_CHAR
 #if __STDC__
+#ifndef VMS
 #define SIGN_EXTEND_CHAR(c) ((signed char) (c))
+#else /* On VMS, VAXC doesn't recognize `signed' before `char' */
+#define SIGN_EXTEND_CHAR(c) ((char) (c))
+#endif /* VMS */
 #else
 /* As in Harbison and Steele.  */
 #define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -20,6 +20,11 @@
 #ifndef __REGEXP_LIBRARY_H__
 #define __REGEXP_LIBRARY_H__
 
+#ifdef VMS
+/* POSIX says that size_t should be in stddef.h.  */
+#include <stddef.h>
+#endif
+
 /* POSIX says that <sys/types.h> must be included before <regex.h>.  */
 
 /* The following bits are used to determine the regexp syntax we
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -36,7 +36,7 @@
 extern int errno;
 #endif
 
-#if !__STDC__
+#if !__STDC__ && !defined(const)
 #define const
 #endif