[project @ 2002-02-15 11:27:03 by simonpj]
authorsimonpj <unknown>
Fri, 15 Feb 2002 11:27:03 +0000 (11:27 +0000)
committersimonpj <unknown>
Fri, 15 Feb 2002 11:27:03 +0000 (11:27 +0000)
- include <sys/types.h> rather than non-std <sys/cdefs.h>
- remove use of __P-style prototypes

cbits/regex/regex.h

index 1611d4b..0c7fe1d 100644 (file)
@@ -40,7 +40,7 @@
 #ifndef _REGEX_H_
 #define        _REGEX_H_
 
-#include <sys/cdefs.h>
+#include <sys/types.h>
 
 /* types */
 typedef off_t regoff_t;
@@ -95,12 +95,19 @@ typedef struct {
 #define        REG_LARGE       01000   /* force large representation */
 #define        REG_BACKR       02000   /* force use of backref code */
 
-__BEGIN_DECLS
-int    regcomp __P((regex_t *, const char *, int));
-size_t regerror __P((int, const regex_t *, char *, size_t));
-int    regexec __P((const regex_t *,
-           const char *, size_t, regmatch_t [], int));
-void   regfree __P((regex_t *));
-__END_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int    regcomp (regex_t *, const char *, int);
+size_t regerror (int, const regex_t *, char *, size_t);
+int    regexec (const regex_t *,
+           const char *, size_t, regmatch_t [], int);
+void   regfree (regex_t *);
+
+#ifdef __cplusplus
+}
+extern "C" {
+#endif
 
 #endif /* !_REGEX_H_ */