OpenSDE Packages Database (without history before r20070)
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.

56 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../ezipupdate/errno.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  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. # --- SDE-COPYRIGHT-NOTE-END ---
  17. --- ./conf_file.c.orig 2000-10-23 04:36:18.000000000 +0200
  18. +++ ./conf_file.c 2003-05-28 08:42:42.000000000 +0200
  19. @@ -1,4 +1,4 @@
  20. -/* ============================================================================
  21. + /* ============================================================================
  22. * Copyright (C) 1999 Angus Mackay. All rights reserved;
  23. *
  24. * This program is free software; you can redistribute it and/or modify
  25. @@ -37,13 +37,16 @@
  26. #include <conf_file.h>
  27. -#if HAVE_STRERROR
  28. +#if HAVE_ERRNO_H
  29. +# include <errno.h>
  30. +#elif HAVE_STRERROR
  31. extern int errno;
  32. # define error_string strerror(errno)
  33. -#elif HAVE_SYS_ERRLIST
  34. -extern const char *const sys_errlist[];
  35. -extern int errno;
  36. -# define error_string (sys_errlist[errno])
  37. +#endif
  38. +
  39. +#if HAVE_SYS_ERRLIST
  40. +//extern char *const strerror[];
  41. +# define error_string (strerror[errno])
  42. #else
  43. # define error_string "error message not found"
  44. #endif
  45. @@ -85,7 +88,7 @@ int parse_conf_file(char *fname, struct
  46. {
  47. if((in=fopen(fname, "r")) == NULL)
  48. {
  49. - fprintf(stderr, "could not open config file \"%s\": %s\n", fname, error_string);
  50. + fprintf(stderr, "could not open config file \"%s\"\n", fname);
  51. return(-1);
  52. }
  53. }