From: Josh Bressers Date: Sat, 7 Jan 2006 15:22:19 +0000 (+0000) Subject: * Remove sbr/strerror.c -- strerror(3) is defined in C89. X-Git-Tag: nmh-1_3_RC1~75 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=aa2501ef873e96a8500c53b05280dcc0ade952c2;p=mmh * Remove sbr/strerror.c -- strerror(3) is defined in C89. --- diff --git a/ChangeLog b/ChangeLog index 46d2bdb..4adb880 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-01-07 Josh Bressers + + * Remove sbr/strerror.c -- strerror(3) is defined in C89. + 2006-01-06 Josh Bressers * patch #3968: Move the add() function from its own file (add.c) and diff --git a/configure.in b/configure.in index 2485a5f..e52c5e6 100644 --- a/configure.in +++ b/configure.in @@ -517,7 +517,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[sigsetjmp((void *)0, 0);]])],[AC_DEFINE(HAVE_SIGSETJMP) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) -AC_REPLACE_FUNCS(snprintf strerror strdup) +AC_REPLACE_FUNCS(snprintf strdup) dnl Look for the initgroups() declaration. On AIX 4.[13], Solaris 4.1.3, and dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in diff --git a/h/prototypes.h b/h/prototypes.h index d53d663..de57cb8 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -140,10 +140,6 @@ int vsnprintf (char *, size_t, const char *, va_list); int strcasecmp (const char *s1, const char *s2); int strncasecmp (const char *s1, const char *s2, size_t n); -#ifndef HAVE_STRERROR -char *strerror (int); -#endif - /* * some prototypes for address parsing system diff --git a/sbr/Makefile.in b/sbr/Makefile.in index d6c2796..37434d9 100644 --- a/sbr/Makefile.in +++ b/sbr/Makefile.in @@ -78,7 +78,7 @@ SRCS = addrsbr.c ambigsw.c atooi.c brkstring.c \ m_msgdef.c mf.c utils.c # source for compatibility functions -COMPAT = snprintf.c strdup.c strerror.c +COMPAT = snprintf.c strdup.c OBJS = $(SRCS:.c=.o) diff --git a/sbr/strerror.c b/sbr/strerror.c deleted file mode 100644 index ce78ada..0000000 --- a/sbr/strerror.c +++ /dev/null @@ -1,25 +0,0 @@ - -/* - * strerror.c -- get error message string - * - * $Id$ - * - * This code is Copyright (c) 2002, by the authors of nmh. See the - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ - -#include - -extern int sys_nerr; -extern char *sys_errlist[]; - - -char * -strerror (int errnum) -{ - if (errnum > 0 && errnum < sys_nerr) - return sys_errlist[errnum]; - else - return NULL; -}