You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
904 B

  1. --- a/regex/regex.h
  2. +++ b/regex/regex.h
  3. @@ -42,16 +42,12 @@
  4. #ifndef _REGEX_H_
  5. #define _REGEX_H_
  6. -#ifdef WIN32
  7. #include <sys/types.h>
  8. #define __const
  9. #define __BEGIN_DECLS
  10. #define __END_DECLS
  11. #define __P(_X) _X
  12. -#else
  13. -#include <sys/cdefs.h>
  14. #define __stdcall
  15. -#endif
  16. /* types */
  17. typedef off_t regoff_t;
  18. @@ -106,12 +102,16 @@ typedef struct {
  19. #define REG_LARGE 01000 /* force large representation */
  20. #define REG_BACKR 02000 /* force use of backref code */
  21. -__BEGIN_DECLS
  22. +#ifdef __cplusplus
  23. +extern "C" {
  24. +#endif
  25. int __stdcall regcomp __P((regex_t *, const char *, int));
  26. size_t __stdcall regerror __P((int, const regex_t *, char *, size_t));
  27. int __stdcall regexec __P((const regex_t *,
  28. const char *, size_t, regmatch_t [], int));
  29. void __stdcall regfree __P((regex_t *));
  30. -__END_DECLS
  31. +#ifdef __cplusplus
  32. +}
  33. +#endif
  34. #endif /* !_REGEX_H_ */