# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/blindcoder/ezipupdate/errno.patch # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it 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. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at http://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-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 -#if HAVE_STRERROR +#if HAVE_ERRNO_H +# include +#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); } }