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.

79 lines
2.3 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/base/dietlibc/stdio_h.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. This is needed because a definition like:
  20. "static FILE dummy;"
  21. will not work because of:
  22. "storage size of `dummy' isn't known"
  23. and that can be found in coreutils ...
  24. --- ./dietstdio.h~ Fri Dec 13 21:23:43 2002
  25. +++ ./dietstdio.h Sat Apr 19 17:07:14 2003
  26. @@ -14,22 +14,6 @@
  27. #define BUFSIZE 2048
  28. #endif
  29. -struct __stdio_file {
  30. - int fd;
  31. - int flags;
  32. - unsigned int bs; /* read: bytes in buffer */
  33. - unsigned int bm; /* position in buffer */
  34. - unsigned int buflen; /* length of buf */
  35. - char *buf;
  36. - struct __stdio_file *next; /* for fflush */
  37. - pid_t popen_kludge;
  38. - unsigned char ungetbuf;
  39. - char ungotten;
  40. -#ifdef WANT_THREAD_SAFE
  41. - pthread_mutex_t m;
  42. -#endif
  43. -};
  44. -
  45. #define ERRORINDICATOR 1
  46. #define EOFINDICATOR 2
  47. #define BUFINPUT 4
  48. --- ./include/stdio.h.orig Sat Apr 19 17:18:15 2003
  49. +++ ./include/stdio.h Sat Apr 19 17:20:18 2003
  50. @@ -5,6 +5,26 @@
  51. #include <sys/types.h>
  52. #include <sys/stat.h>
  53. +#ifndef _PTHREAD_H
  54. +#include <pthread.h>
  55. +#endif
  56. +
  57. +struct __stdio_file {
  58. + int fd;
  59. + int flags;
  60. + unsigned int bs; /* read: bytes in buffer */
  61. + unsigned int bm; /* position in buffer */
  62. + unsigned int buflen; /* length of buf */
  63. + char *buf;
  64. + struct __stdio_file *next; /* for fflush */
  65. + pid_t popen_kludge;
  66. + unsigned char ungetbuf;
  67. + char ungotten;
  68. +#ifdef WANT_THREAD_SAFE
  69. + pthread_mutex_t m;
  70. +#endif
  71. +};
  72. +
  73. typedef struct __stdio_file FILE;
  74. FILE *fopen (const char *path, const char *mode) __THROW;