mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
(strerror_r): Remove decl; not needed.
(strerror): Use same pattern as ../lib/error.c.
This commit is contained in:
@@ -43,13 +43,6 @@ void exit ();
|
|||||||
|
|
||||||
#include "complain.h"
|
#include "complain.h"
|
||||||
|
|
||||||
#ifndef HAVE_DECL_STRERROR_R
|
|
||||||
"this configure-time declaration test was not run"
|
|
||||||
#endif
|
|
||||||
#if !HAVE_DECL_STRERROR_R
|
|
||||||
char *strerror_r ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _
|
#ifndef _
|
||||||
# define _(String) String
|
# define _(String) String
|
||||||
#endif
|
#endif
|
||||||
@@ -76,14 +69,14 @@ char *strerror_r ();
|
|||||||
name of the executing program. */
|
name of the executing program. */
|
||||||
extern char *program_name;
|
extern char *program_name;
|
||||||
|
|
||||||
# ifdef HAVE_STRERROR_R
|
# if HAVE_STRERROR
|
||||||
# define __strerror_r strerror_r
|
# ifndef HAVE_DECL_STRERROR
|
||||||
|
"this configure-time declaration test was not run"
|
||||||
|
# endif
|
||||||
|
# if !HAVE_DECL_STRERROR && !defined strerror
|
||||||
|
char *strerror PARAMS ((int));
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# if HAVE_STRERROR
|
|
||||||
# ifndef strerror /* On some systems, strerror is a macro */
|
|
||||||
char *strerror ();
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
static char *
|
static char *
|
||||||
private_strerror (errnum)
|
private_strerror (errnum)
|
||||||
int errnum;
|
int errnum;
|
||||||
@@ -95,9 +88,8 @@ private_strerror (errnum)
|
|||||||
return _(sys_errlist[errnum]);
|
return _(sys_errlist[errnum]);
|
||||||
return _("Unknown system error");
|
return _("Unknown system error");
|
||||||
}
|
}
|
||||||
# define strerror private_strerror
|
# define strerror private_strerror
|
||||||
# endif /* HAVE_STRERROR */
|
# endif /* HAVE_STRERROR */
|
||||||
# endif /* HAVE_STRERROR_R */
|
|
||||||
#endif /* not _LIBC */
|
#endif /* not _LIBC */
|
||||||
|
|
||||||
/* This variable is incremented each time `warn' is called. */
|
/* This variable is incremented each time `warn' is called. */
|
||||||
|
|||||||
Reference in New Issue
Block a user