fsl.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --- lib_pcre/pcre.h.orig Fri Jan 11 10:19:12 2002
  2. +++ lib_pcre/pcre.h Mon Nov 17 06:16:46 2003
  3. @@ -86,9 +86,19 @@
  4. /* Store get and free functions. These can be set to alternative malloc/free
  5. functions if required. Some magic is required for Win32 DLL; it is null on
  6. other OS. */
  7. -
  8. +/* force usage of native malloc is a dirty hack to get
  9. + around "gp-relative relocation against dynamic symbol
  10. + pcre_(malloc|free)" problem on Alpha as reported in
  11. + http://marc.theaimsgroup.com/?l=kroupware&m=106849138602149. Using
  12. + it prevents applications from providing customized memory management
  13. + functions for pcre at runtime which does break the test suite */
  14. +#ifdef PCRE_FORCENATIVEMALLOC
  15. +#define pcre_malloc malloc
  16. +#define pcre_free free
  17. +#else
  18. PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
  19. PCRE_DL_IMPORT extern void (*pcre_free)(void *);
  20. +#endif
  21. #undef PCRE_DL_IMPORT
  22. --- lib_pcre/pcre.c.orig Mon Jan 7 15:21:06 2002
  23. +++ lib_pcre/pcre.c Mon Nov 17 06:18:15 2003
  24. @@ -184,8 +184,12 @@
  25. indirections below, which are can be changed by the caller, but are shared
  26. between all threads. */
  27. +#ifdef PCRE_FORCENATIVEMALLOC
  28. +/* nop */
  29. +#else
  30. void *(*pcre_malloc)(size_t) = malloc;
  31. void (*pcre_free)(void *) = free;
  32. +#endif
  33. Index: lib_l2/l2_ut_pcre.c
  34. --- lib_l2/l2_ut_pcre.c.orig 2003-01-28 10:10:39.000000000 +0100
  35. +++ lib_l2/l2_ut_pcre.c 2003-11-17 13:19:34.000000000 +0100
  36. @@ -377,8 +377,12 @@
  37. #define match_condassert 0x01
  38. #define match_isgroup 0x02
  39. -void *(*pcre_malloc) (size_t) = malloc;
  40. -void (*pcre_free) (void *) = free;
  41. +#ifdef PCRE_FORCENATIVEMALLOC
  42. +/* nop */
  43. +#else
  44. +void *(*pcre_malloc)(size_t) = malloc;
  45. +void (*pcre_free)(void *) = free;
  46. +#endif
  47. #ifndef L2_UT_PCRE_SUPPORT_UTF8
  48. #define GETCHARINC(c, eptr) c = *eptr++;
  49. Index: lib_l2/l2_ut_pcre.h
  50. --- lib_l2/l2_ut_pcre.h.orig 2002-01-11 11:36:14.000000000 +0100
  51. +++ lib_l2/l2_ut_pcre.h 2003-11-17 13:29:07.000000000 +0100
  52. @@ -59,8 +59,19 @@
  53. #define __PCRE_CONCAT(x) x
  54. #define PCRE_CONCAT(x,y) __PCRE_CONCAT(x)y
  55. #endif
  56. +/* force usage of native malloc is a dirty hack to get
  57. + around "gp-relative relocation against dynamic symbol
  58. + pcre_(malloc|free)" problem on Alpha as reported in
  59. + http://marc.theaimsgroup.com/?l=kroupware&m=106849138602149. Using
  60. + it prevents applications from providing customized memory management
  61. + functions for pcre at runtime which does break the test suite */
  62. +#ifdef PCRE_FORCENATIVEMALLOC
  63. +#define pcre_malloc malloc
  64. +#define pcre_free free
  65. +#else
  66. #define pcre_malloc PCRE_CONCAT(PCRE_PREFIX,pcre_malloc)
  67. #define pcre_free PCRE_CONCAT(PCRE_PREFIX,pcre_free)
  68. +#endif
  69. #define pcre_compile PCRE_CONCAT(PCRE_PREFIX,pcre_compile)
  70. #define pcre_copy_substring PCRE_CONCAT(PCRE_PREFIX,pcre_copy_substring)
  71. #define pcre_exec PCRE_CONCAT(PCRE_PREFIX,pcre_exec)
  72. @@ -116,8 +127,12 @@
  73. typedef struct pcre_st pcre;
  74. typedef struct pcre_extra_st pcre_extra;
  75. +#ifdef PCRE_FORCENATIVEMALLOC
  76. +/* nop */
  77. +#else
  78. extern void *(*pcre_malloc)(size_t);
  79. extern void (*pcre_free)(void *);
  80. +#endif
  81. extern pcre *pcre_compile(const char *, int, const char **, int *,
  82. const unsigned char *);