-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);
+//Begin-Libc
+#ifndef LIBC_ALIAS_REGCOMP
+//End-Libc
+int regcomp(regex_t * __restrict, const char * __restrict, int) __DARWIN_ALIAS(regcomp);
+//Begin-Libc
+#else /* LIBC_ALIAS_REGCOMP */
+int regcomp(regex_t * __restrict, const char * __restrict, int) LIBC_ALIAS(regcomp);
+#endif /* !LIBC_ALIAS_REGCOMP */
+//End-Libc
+size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t);
+/*
+ * gcc under c99 mode won't compile "[ __restrict]" by itself. As a workaround,
+ * a dummy argument name is added.
+ */
+int regexec(const regex_t * __restrict, const char * __restrict, size_t,
+ regmatch_t __pmatch[ __restrict], int);