summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2004-05-18 08:50:22 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2004-05-18 08:50:22 +0000
commit8f8ace0a2c9190bdad4c496fb78ec99deba5f887 (patch)
tree97d5525a707a7a890989b1cbc21b0e0ecadb7a60
parentafe9198187905e640d0594b6327b93864f797461 (diff)
strerror est standard ANSI C
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--byterun/sys.c21
-rw-r--r--config/s-templ.h4
2 files changed, 0 insertions, 25 deletions
diff --git a/byterun/sys.c b/byterun/sys.c
index f76a55643..c5f5c60e1 100644
--- a/byterun/sys.c
+++ b/byterun/sys.c
@@ -51,32 +51,11 @@
extern int errno;
#endif
-#ifdef HAS_STRERROR
-
-#ifndef _WIN32
-extern char * strerror(int);
-#endif
-
static char * error_message(void)
{
return strerror(errno);
}
-#else
-
-extern int sys_nerr;
-extern char * sys_errlist [];
-
-static char * error_message(void)
-{
- if (errno < 0 || errno >= sys_nerr)
- return "unknown error";
- else
- return sys_errlist[errno];
-}
-
-#endif /* HAS_STRERROR */
-
#ifndef EAGAIN
#define EAGAIN (-1)
#endif
diff --git a/config/s-templ.h b/config/s-templ.h
index 8411ce41c..bbbffb4fa 100644
--- a/config/s-templ.h
+++ b/config/s-templ.h
@@ -47,10 +47,6 @@
Also add the required libraries (e.g. -lcurses -ltermcap) to $(CCLIBS)
in ../Makefile.config */
-#define HAS_STRERROR
-
-/* Define HAS_STRERROR if you have strerror(). */
-
#define SUPPORT_DYNAMIC_LINKING
/* Define SUPPORT_DYNAMIC_LINKING if dynamic loading of C stub code