summaryrefslogtreecommitdiff
path: root/include/regex.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-10-02 07:48:13 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-10-02 07:48:13 +0000
commit49ab7b9411f5bbfb05c6685db7d7471bf106c4bf (patch)
treedfbddb966e6a63e0034b9903a318c462cde02f61 /include/regex.h
parentf2ba8326cdb0f75d79b3225aed7b3a25075ac610 (diff)
downloadsrc-test2-49ab7b9411f5bbfb05c6685db7d7471bf106c4bf.tar.gz
src-test2-49ab7b9411f5bbfb05c6685db7d7471bf106c4bf.zip
o Add typedef for size_t.
o Fix regoff_t typedef to not require <sys/types.h> as a prerequisite (specifically use `__off_t' instead of `off_t'). o Add restrict type-qualifier to function prototypes.
Notes
Notes: svn path=/head/; revision=104356
Diffstat (limited to 'include/regex.h')
-rw-r--r--include/regex.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/regex.h b/include/regex.h
index 0c52bd7f27f3..658ce8ed6cec 100644
--- a/include/regex.h
+++ b/include/regex.h
@@ -42,9 +42,15 @@
#define _REGEX_H_
#include <sys/cdefs.h>
+#include <sys/_types.h>
/* types */
-typedef off_t regoff_t;
+typedef __off_t regoff_t;
+
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
+#endif
typedef struct {
int re_magic;
@@ -97,9 +103,10 @@ typedef struct {
#define REG_BACKR 02000 /* force use of backref code */
__BEGIN_DECLS
-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);
+int regcomp(regex_t * __restrict, const char * __restrict, int);
+size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t);
+int regexec(const regex_t * __restrict, const char * __restrict, size_t,
+ regmatch_t [__restrict], int);
void regfree(regex_t *);
__END_DECLS