summaryrefslogtreecommitdiffstats
path: root/main/ez-ipupdate/errno.patch
blob: fea525807259f23043fb7d4d5c19f03b588fbf5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../ezipupdate/errno.patch
# Copyright (C) 2004 - 2005 The T2 SDE Project
# Copyright (C) 1998 - 2003 ROCK Linux Project
# 
# More information can be found in the files COPYING and README.
# 
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

--- ./conf_file.c.orig	2000-10-23 04:36:18.000000000 +0200
+++ ./conf_file.c	2003-05-28 08:42:42.000000000 +0200
@@ -1,4 +1,4 @@
-/* ============================================================================
+	/* ============================================================================
  * Copyright (C) 1999 Angus Mackay. All rights reserved; 
  *
  * This program is free software; you can redistribute it and/or modify
@@ -37,13 +37,16 @@
 
 #include <conf_file.h>
 
-#if HAVE_STRERROR
+#if HAVE_ERRNO_H
+#  include <errno.h>
+#elif HAVE_STRERROR
 extern int errno;
 #  define error_string strerror(errno)
-#elif HAVE_SYS_ERRLIST
-extern const char *const sys_errlist[];
-extern int errno;
-#  define error_string (sys_errlist[errno])
+#endif
+
+#if HAVE_SYS_ERRLIST
+//extern char *const strerror[];
+#  define error_string (strerror[errno])
 #else
 #  define error_string "error message not found"
 #endif
@@ -85,7 +88,7 @@ int parse_conf_file(char *fname, struct 
   {
     if((in=fopen(fname, "r")) == NULL)
     {
-      fprintf(stderr, "could not open config file \"%s\": %s\n", fname, error_string);
+      fprintf(stderr, "could not open config file \"%s\"\n", fname);
       return(-1);
     }
   }