1 /* Copyright (C) 1991,1992,1995,1997,1999,2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 /* Make a definition for sys_errlist. */
26 extern const char *const sys_errlist
[];
38 timenow
= *localtime (&now
);
40 year
= timenow
.tm_year
+ 1900;
42 printf ("/* Copyright (C) %d Free Software Foundation, Inc.\n\
43 This file is part of the GNU C Library.\n\
45 The GNU C Library is free software; you can redistribute it and/or\n\
46 modify it under the terms of the GNU Lesser General Public\n\
47 License as published by the Free Software Foundation; either\n\
48 version 2.1 of the License, or (at your option) any later version.\n\
50 The GNU C Library is distributed in the hope that it will be useful,\n\
51 but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
52 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n\
53 Lesser General Public License for more details.\n\
55 You should have received a copy of the GNU Lesser General Public\n\
56 License along with the GNU C Library; if not, write to the Free\n\
57 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\n\
58 02111-1307 USA. */\n", year
);
60 puts ("#include <stddef.h>\n");
61 puts ("#include <libintl.h>\n");
62 puts ("\n/* This is a list of all known `errno' codes. */\n");
64 printf ("\nconst int _sys_nerr = %d;\n\n", sys_nerr
);
65 puts ("const char *const _sys_errlist[] =\n {");
67 for (i
= 0; i
< sys_nerr
; ++i
)
68 printf (" N_(\"%s\"),\n",
71 #else /* ! HAVE_STRERROR */
73 #endif /* HAVE_STRERROR */
76 puts (" NULL\n };\n");
78 puts ("weak_alias (_sys_errlist, sys_errlist)");
79 puts ("weak_alias (_sys_nerr, sys_nerr)");