* updated kmbox (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / network / ezipupdate / errno.patch
blobfea525807259f23043fb7d4d5c19f03b588fbf5b
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../ezipupdate/errno.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 --- ./conf_file.c.orig 2000-10-23 04:36:18.000000000 +0200
19 +++ ./conf_file.c 2003-05-28 08:42:42.000000000 +0200
20 @@ -1,4 +1,4 @@
21 -/* ============================================================================
22 + /* ============================================================================
23 * Copyright (C) 1999 Angus Mackay. All rights reserved;
25 * This program is free software; you can redistribute it and/or modify
26 @@ -37,13 +37,16 @@
28 #include <conf_file.h>
30 -#if HAVE_STRERROR
31 +#if HAVE_ERRNO_H
32 +# include <errno.h>
33 +#elif HAVE_STRERROR
34 extern int errno;
35 # define error_string strerror(errno)
36 -#elif HAVE_SYS_ERRLIST
37 -extern const char *const sys_errlist[];
38 -extern int errno;
39 -# define error_string (sys_errlist[errno])
40 +#endif
42 +#if HAVE_SYS_ERRLIST
43 +//extern char *const strerror[];
44 +# define error_string (strerror[errno])
45 #else
46 # define error_string "error message not found"
47 #endif
48 @@ -85,7 +88,7 @@ int parse_conf_file(char *fname, struct
50 if((in=fopen(fname, "r")) == NULL)
52 - fprintf(stderr, "could not open config file \"%s\": %s\n", fname, error_string);
53 + fprintf(stderr, "could not open config file \"%s\"\n", fname);
54 return(-1);