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.

82 lines
2.4 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 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. This is needed because a definition like:
  23. "static FILE dummy;"
  24. will not work because of:
  25. "storage size of `dummy' isn't known"
  26. and that can be found in coreutils ...
  27. --- ./dietstdio.h~ Fri Dec 13 21:23:43 2002
  28. +++ ./dietstdio.h Sat Apr 19 17:07:14 2003
  29. @@ -14,22 +14,6 @@
  30. #define BUFSIZE 2048
  31. #endif
  32. -struct __stdio_file {
  33. - int fd;
  34. - int flags;
  35. - unsigned int bs; /* read: bytes in buffer */
  36. - unsigned int bm; /* position in buffer */
  37. - unsigned int buflen; /* length of buf */
  38. - char *buf;
  39. - struct __stdio_file *next; /* for fflush */
  40. - pid_t popen_kludge;
  41. - unsigned char ungetbuf;
  42. - char ungotten;
  43. -#ifdef WANT_THREAD_SAFE
  44. - pthread_mutex_t m;
  45. -#endif
  46. -};
  47. -
  48. #define ERRORINDICATOR 1
  49. #define EOFINDICATOR 2
  50. #define BUFINPUT 4
  51. --- ./include/stdio.h.orig Sat Apr 19 17:18:15 2003
  52. +++ ./include/stdio.h Sat Apr 19 17:20:18 2003
  53. @@ -5,6 +5,26 @@
  54. #include <sys/types.h>
  55. #include <sys/stat.h>
  56. +#ifndef _PTHREAD_H
  57. +#include <pthread.h>
  58. +#endif
  59. +
  60. +struct __stdio_file {
  61. + int fd;
  62. + int flags;
  63. + unsigned int bs; /* read: bytes in buffer */
  64. + unsigned int bm; /* position in buffer */
  65. + unsigned int buflen; /* length of buf */
  66. + char *buf;
  67. + struct __stdio_file *next; /* for fflush */
  68. + pid_t popen_kludge;
  69. + unsigned char ungetbuf;
  70. + char ungotten;
  71. +#ifdef WANT_THREAD_SAFE
  72. + pthread_mutex_t m;
  73. +#endif
  74. +};
  75. +
  76. typedef struct __stdio_file FILE;
  77. FILE *fopen (const char *path, const char *mode) __THROW;