diff --git a/src/modules/Regexp/glue.c b/src/modules/Regexp/glue.c
index d12810c6df6c2c367ee09062138848eabd8d7a5b..1775386234e9739f07635f22d4fbe7320fffca71 100644
--- a/src/modules/Regexp/glue.c
+++ b/src/modules/Regexp/glue.c
@@ -79,7 +79,7 @@ static void regexp_create(INT32 args)
       THIS->num_paren = i;
     }
 #else
-    THIS->regexp=regcomp(sp[-args].u.string->str, 0);
+    THIS->regexp=pike_regcomp(sp[-args].u.string->str, 0);
 #endif
   }
 }
@@ -87,7 +87,7 @@ static void regexp_create(INT32 args)
 static void regexp_match(INT32 args)
 {
   int i;
-  const char *str;
+  char *str;
 #ifdef USE_SYSTEM_REGEXP
   regex_t *regexp = &(THIS->regexp);
 #else
@@ -101,7 +101,7 @@ static void regexp_match(INT32 args)
   i = !regexec(regexp, str, 0, NULL, 0);
   DISALLOW_THREADS();
 #else
-  i=regexec(regexp, str);
+  i=pike_regexec(regexp, str);
 #endif /* USE_SYSTEM_REGEXP */
   pop_n_elems(args);
   push_int(i);
@@ -151,7 +151,7 @@ static void regexp_split(INT32 args)
     push_int(0);
   }
 #else
-  if(regexec(r=THIS->regexp, s->str))
+  if(pike_regexec(r=THIS->regexp, s->str))
   {
     int i,j;
     s->refs++;
diff --git a/src/modules/Regexp/pike_regexp.c b/src/modules/Regexp/pike_regexp.c
index 7617935682938605dafa439b5a942b9f8aec0268..a0ff79a859b6109aa845a8329a2e40deeaf28e3d 100644
--- a/src/modules/Regexp/pike_regexp.c
+++ b/src/modules/Regexp/pike_regexp.c
@@ -242,9 +242,7 @@ STATIC void     regoptail();
  * Beware that the optimization-preparation code in here knows about some
  * of the structure of the compiled regexp.
  */
-regexp *regcomp(exp,excompat)
-char   *exp;
-int		excompat;	/* \( \) operators like in unix ex */
+regexp *pike_regcomp(char *exp,int excompat)
 {
     register regexp *r;
     register char  *scan;
@@ -784,9 +782,7 @@ STATIC char    *regprop();
 /*
  - regexec - match a regexp against a string
  */
-int regexec(prog, string)
-register regexp *prog;
-register char  *string;
+int pike_regexec(regexp *prog, char *string)
 {
     register char  *s;
 
@@ -1316,19 +1312,8 @@ char           *op;
 /*
  - regsub - perform substitutions after a regexp match
  */
-#ifdef __STDC__
-
-char *regsub(regexp *prog, char *source, char *dest, int n)
 
-#else
-
-char *regsub(prog, source, dest, n)
-regexp         *prog;
-char           *source;
-char           *dest;
-int		n;
-
-#endif
+char *pike_regsub(regexp *prog, char *source, char *dest, int n)
 {
     register char  *src;
     register char  *dst;
@@ -1389,20 +1374,3 @@ int		n;
     return dst;
 }
 
-
-#if 0	/* Use the local regerror() in ed.c */
-#ifdef __STDC__
-
-void regerror(char *s)
-
-#else
-
-void regerror(s)
-char           *s;
-
-#endif
-{
-    fprintf(stderr, "regexp(3): %s", s);
-    exit(1);
-}
-#endif /* 0 */
diff --git a/src/modules/Regexp/pike_regexp.h b/src/modules/Regexp/pike_regexp.h
index 5fa51439e9d3a849345c4e2039523083d5f85639..621691cfe0072cd68d51f896ad3eadecb8f1ccdc 100644
--- a/src/modules/Regexp/pike_regexp.h
+++ b/src/modules/Regexp/pike_regexp.h
@@ -26,8 +26,10 @@ typedef struct regexp
 
 
 
-extern regexp *regcomp();
-extern int regexec();
-extern char *regsub();
-extern void regerror();
+/* Prototypes begin here */
+regexp *pike_regcomp(char *exp,int excompat);
+int pike_regexec(regexp *prog, char *string);
+char *pike_regsub(regexp *prog, char *source, char *dest, int n);
+/* Prototypes end here */
+
 #endif