proftpd-1.3.0a-bcopy.patch 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. diff -urN proftpd-1.3.0a-0rig/ChangeLog proftpd-1.3.0a/ChangeLog
  2. --- proftpd-1.3.0a-0rig/ChangeLog 2006-04-16 23:39:01.000000000 +0200
  3. +++ proftpd-1.3.0a/ChangeLog 2007-09-24 08:18:14.000000000 +0200
  4. @@ -1,3 +1,11 @@
  5. +2007-09-24 08:00 ulfs
  6. +
  7. + * contrib/mod_load/mod_load.c.in
  8. + * include/conf.h
  9. + * lib/glibc-glob.c
  10. +
  11. + Replace bzero/bcopy with memset/memcpy
  12. +
  13. 2006-04-16 14:36 castaglia
  14. * contrib/dist/rpm/proftpd.spec, include/version.h, NEWS:
  15. diff -urN proftpd-1.3.0a-0rig/config.h.in proftpd-1.3.0a/config.h.in
  16. --- proftpd-1.3.0a-0rig/config.h.in 2005-10-20 01:28:30.000000000 +0200
  17. +++ proftpd-1.3.0a/config.h.in 2007-09-24 08:24:38.000000000 +0200
  18. @@ -190,7 +190,7 @@
  19. #undef STACK_DIRECTION
  20. /* Define if you have the ANSI C header files. */
  21. -#undef STDC_HEADERS
  22. +#define STDC_HEADERS 1
  23. /* Define if you can safely include both <sys/time.h> and <time.h>. */
  24. #undef TIME_WITH_SYS_TIME
  25. @@ -202,10 +202,10 @@
  26. #undef uid_t
  27. /* The number of bytes in a short. */
  28. -#undef SIZEOF_SHORT
  29. +#define SIZEOF_SHORT 2
  30. /* The number of bytes in an int. */
  31. -#undef SIZEOF_INT
  32. +#define SIZEOF_INT 4
  33. /* The number of bytes in a long. */
  34. #undef SIZEOF_LONG
  35. @@ -222,9 +222,6 @@
  36. /* The number of bytes in a time_t. */
  37. #undef SIZEOF_TIME_T
  38. -/* Define if you have the bcopy function. */
  39. -#undef HAVE_BCOPY
  40. -
  41. /* Define if you have the crypt function. */
  42. #undef HAVE_CRYPT
  43. @@ -307,7 +304,7 @@
  44. #undef HAVE_INET_PTON
  45. /* Define if you have the memcpy function. */
  46. -#undef HAVE_MEMCPY
  47. +#define HAVE_MEMCPY 1
  48. /* Define if you have the mempcpy function. */
  49. #undef HAVE_MEMPCPY
  50. diff -urN proftpd-1.3.0a-0rig/contrib/mod_load/mod_load.c.in proftpd-1.3.0a/contrib/mod_load/mod_load.c.in
  51. --- proftpd-1.3.0a-0rig/contrib/mod_load/mod_load.c.in 2005-01-07 00:39:59.000000000 +0100
  52. +++ proftpd-1.3.0a/contrib/mod_load/mod_load.c.in 2007-09-24 08:02:01.000000000 +0200
  53. @@ -651,7 +651,7 @@
  54. for (i = 0; i < conf.config_maxclass; ++i)
  55. {
  56. struct class_stats stats;
  57. - bzero ((char *) &stats, sizeof stats);
  58. + memset ((char *) &stats, 0, sizeof stats);
  59. desc.sd_type = CPUTYPE_CLASS;
  60. desc.sd_objid = i;
  61. diff -urN proftpd-1.3.0a-0rig/include/conf.h proftpd-1.3.0a/include/conf.h
  62. --- proftpd-1.3.0a-0rig/include/conf.h 2005-06-30 02:39:16.000000000 +0200
  63. +++ proftpd-1.3.0a/include/conf.h 2007-09-24 08:20:26.000000000 +0200
  64. @@ -118,10 +118,6 @@
  65. # define strrchr rindex
  66. # endif
  67. char *strchr(),*strrchr();
  68. -# ifndef HAVE_MEMCPY
  69. -# define memcpy(d,s,n) bcopy((s),(d),(n))
  70. -# define memmove(d,s,n) bcopy((s),(d),(n))
  71. -# endif
  72. #endif
  73. #ifdef HAVE_BSTRING_H
  74. @@ -264,13 +260,6 @@
  75. off_t lseek(int, off_t, int);
  76. #endif
  77. -/* See if we have bcopy, if not define them to use the memcpy functions */
  78. -
  79. -#ifndef HAVE_BCOPY
  80. -# define bcopy(s,d,n) memcpy((d),(s),(n))
  81. -# define bzero(d,n) memset((d),0,(n))
  82. -#endif
  83. -
  84. /* Solaris has __vsnprintf, but no vsnprintf */
  85. #if ! defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
  86. # undef vsnprintf
  87. diff -urN proftpd-1.3.0a-0rig/lib/glibc-glob.c proftpd-1.3.0a/lib/glibc-glob.c
  88. --- proftpd-1.3.0a-0rig/lib/glibc-glob.c 2006-03-22 23:10:34.000000000 +0100
  89. +++ proftpd-1.3.0a/lib/glibc-glob.c 2007-09-24 08:07:48.000000000 +0200
  90. @@ -215,18 +215,8 @@
  91. #ifndef ANSI_STRING
  92. -# ifndef bzero
  93. -extern void bzero ();
  94. -# endif
  95. -# ifndef bcopy
  96. -extern void bcopy ();
  97. -# endif
  98. -
  99. -# define memcpy(d, s, n) bcopy ((s), (d), (n))
  100. # define strrchr rindex
  101. /* memset is only used for zero here, but let's be paranoid. */
  102. -# define memset(s, better_be_zero, n) \
  103. - ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0)))
  104. #endif /* Not ANSI_STRING. */
  105. #if !defined HAVE_STRCOLL && !defined _LIBC
  106. diff -urN proftpd-1.3.0a-0rig/lib/libltdl/config-h.in proftpd-1.3.0a/lib/libltdl/config-h.in
  107. --- proftpd-1.3.0a-0rig/lib/libltdl/config-h.in 2004-10-29 07:17:55.000000000 +0200
  108. +++ proftpd-1.3.0a/lib/libltdl/config-h.in 2007-09-24 08:25:40.000000000 +0200
  109. @@ -21,9 +21,6 @@
  110. /* Define to 1 if you have the <assert.h> header file. */
  111. #undef HAVE_ASSERT_H
  112. -/* Define to 1 if you have the `bcopy' function. */
  113. -#undef HAVE_BCOPY
  114. -
  115. /* Define to 1 if you have the `closedir' function. */
  116. #undef HAVE_CLOSEDIR
  117. @@ -74,7 +71,7 @@
  118. #undef HAVE_MALLOC_H
  119. /* Define to 1 if you have the `memcpy' function. */
  120. -#undef HAVE_MEMCPY
  121. +#define HAVE_MEMCPY 1
  122. /* Define to 1 if you have the `memmove' function. */
  123. #undef HAVE_MEMMOVE
  124. @@ -180,7 +177,7 @@
  125. #undef PACKAGE_VERSION
  126. /* Define to 1 if you have the ANSI C header files. */
  127. -#undef STDC_HEADERS
  128. +#define STDC_HEADERS 1
  129. /* Define to empty if `const' does not conform to ANSI C. */
  130. #undef const
  131. diff -urN proftpd-1.3.0a-0rig/lib/libltdl/ltdl.c proftpd-1.3.0a/lib/libltdl/ltdl.c
  132. --- proftpd-1.3.0a-0rig/lib/libltdl/ltdl.c 2004-10-29 07:17:55.000000000 +0200
  133. +++ proftpd-1.3.0a/lib/libltdl/ltdl.c 2007-09-24 08:13:51.000000000 +0200
  134. @@ -372,9 +372,6 @@
  135. if you need that behaviour. */
  136. #if ! HAVE_MEMCPY
  137. -# if HAVE_BCOPY
  138. -# define memcpy(dest, src, size) bcopy (src, dest, size)
  139. -# else
  140. # define memcpy rpl_memcpy
  141. static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size));
  142. @@ -395,7 +392,6 @@
  143. return dest;
  144. }
  145. -# endif /* !HAVE_BCOPY */
  146. #endif /* !HAVE_MEMCPY */
  147. #if ! HAVE_MEMMOVE