mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.0 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/blindcoder/ezipupdate/errno.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./conf_file.c.orig 2000-10-23 04:36:18.000000000 +0200
  20. +++ ./conf_file.c 2003-05-28 08:42:42.000000000 +0200
  21. @@ -1,4 +1,4 @@
  22. -/* ============================================================================
  23. + /* ============================================================================
  24. * Copyright (C) 1999 Angus Mackay. All rights reserved;
  25. *
  26. * This program is free software; you can redistribute it and/or modify
  27. @@ -37,13 +37,16 @@
  28. #include <conf_file.h>
  29. -#if HAVE_STRERROR
  30. +#if HAVE_ERRNO_H
  31. +# include <errno.h>
  32. +#elif HAVE_STRERROR
  33. extern int errno;
  34. # define error_string strerror(errno)
  35. -#elif HAVE_SYS_ERRLIST
  36. -extern const char *const sys_errlist[];
  37. -extern int errno;
  38. -# define error_string (sys_errlist[errno])
  39. +#endif
  40. +
  41. +#if HAVE_SYS_ERRLIST
  42. +//extern char *const strerror[];
  43. +# define error_string (strerror[errno])
  44. #else
  45. # define error_string "error message not found"
  46. #endif
  47. @@ -85,7 +88,7 @@ int parse_conf_file(char *fname, struct
  48. {
  49. if((in=fopen(fname, "r")) == NULL)
  50. {
  51. - fprintf(stderr, "could not open config file \"%s\": %s\n", fname, error_string);
  52. + fprintf(stderr, "could not open config file \"%s\"\n", fname);
  53. return(-1);
  54. }
  55. }