FreeBSD has re_comp in -lcompat.
Use of re_comp/exec for all platforms should be depreciated completely.
--- /dev/null
+#if defined( MACOS ) || defined( DOS ) || defined( _WIN32 ) || defined( NEED_BSDREGEX )
+/*
+ * Copyright (c) 1993 Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of Michigan at Ann Arbor. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+/*
+ * regex.h -- includes for regular expression matching routines
+ * 13 August 1993 Mark C Smith
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined( NEEDPROTOS ) && defined( __STDC__ )
+#define NEEDPROTOS
+#endif
+
+#ifdef NEEDPROTOS
+char *re_comp( char *pat );
+int re_exec( char *lp );
+void re_modw( char *s );
+int re_subs( char *src, char *dst );
+#else /* NEEDPROTOS */
+char *re_comp();
+int re_exec();
+void re_modw();
+int re_subs();
+#endif /* NEEDPROTOS */
+
+#define re_fail( m, p )
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MACOS or DOS or NEED_BSDREGEX */
#endif
/*
- * on many systems, we should use waitpid() instead of waitN()
+ * on most systems, we should use waitpid() instead of waitN()
*/
-#if !defined( USE_WAITPID ) && ( defined( SYSV ) || defined( sunos4 ) || defined( ultrix ) || defined( aix ))
+#if !defined( USE_WAITPID ) && !defined( nextstep )
#define USE_WAITPID
#endif
* some systems don't have the BSD re_comp and re_exec routines
*/
#ifndef NEED_BSDREGEX
-#if defined( SYSV ) || defined( VMS ) || defined( netbsd ) || defined( freebsd ) || defined( linux )
+#if defined( SYSV ) || defined( VMS ) || defined( netbsd ) || defined( linux )
#define NEED_BSDREGEX
#endif
#endif
* Are sys_errlist and sys_nerr declared in stdio.h?
*/
#ifndef SYSERRLIST_IN_STDIO
-#if defined( freebsd )
+#if defined( freebsd ) || defined( __GLIBC__ ) && ( __GLIBC__ > 1 )
#define SYSERRLIST_IN_STDIO
#endif
#endif
* call signal or sigset (signal does not block the signal while
* in the handler on sys v and sigset does not exist on bsd)
*/
-#ifdef SYSV
+#if defined(SYSV) && !defined(linux)
#define SIGNAL sigset
#else
#define SIGNAL signal
+++ /dev/null
-#if defined( MACOS ) || defined( DOS ) || defined( _WIN32 ) || defined( NEED_BSDREGEX )
-/*
- * Copyright (c) 1993 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-/*
- * regex.h -- includes for regular expression matching routines
- * 13 August 1993 Mark C Smith
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined( NEEDPROTOS ) && defined( __STDC__ )
-#define NEEDPROTOS
-#endif
-
-#ifdef NEEDPROTOS
-char *re_comp( char *pat );
-int re_exec( char *lp );
-void re_modw( char *s );
-int re_subs( char *src, char *dst );
-#else /* NEEDPROTOS */
-char *re_comp();
-int re_exec();
-void re_modw();
-int re_subs();
-#endif /* NEEDPROTOS */
-
-#define re_fail( m, p )
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* MACOS or DOS or NEED_BSDREGEX */