]> git.sur5r.net Git - openldap/commitdiff
Rename old regex.h (BSD re_comp) to compat_regex.h to support new regex(3) code.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 19 Aug 1998 18:58:16 +0000 (18:58 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 19 Aug 1998 18:58:16 +0000 (18:58 +0000)
FreeBSD has re_comp in -lcompat.
Use of re_comp/exec for all platforms should be depreciated completely.

include/compat_regex.h [new file with mode: 0644]
include/portable.h
include/regex.h [deleted file]

diff --git a/include/compat_regex.h b/include/compat_regex.h
new file mode 100644 (file)
index 0000000..e006929
--- /dev/null
@@ -0,0 +1,43 @@
+#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 */
index a91b27a5d554e0e53fb682a021d43b76ca74e849..8d08f6feff41d1a5c1859db1bbb787dd4fab44e9 100644 (file)
@@ -61,9 +61,9 @@
 #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
diff --git a/include/regex.h b/include/regex.h
deleted file mode 100644 (file)
index e006929..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#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 */