ctalk.patch 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. Index: ctalk-0.0.56/ctpp/Makefile.in
  2. --- ctalk-0.0.56/ctpp/Makefile.in.orig 2008-04-28 00:37:48 +0200
  3. +++ ctalk-0.0.56/ctpp/Makefile.in 2008-04-28 08:14:42 +0200
  4. @@ -120,7 +120,7 @@
  5. LD = @LD@
  6. LDFLAGS = @LDFLAGS@
  7. LIBOBJS = @LIBOBJS@
  8. -LIBS = $(top_builddir)/libctpp/.libs/libctpp$(LIBEXT)
  9. +LIBS = $(top_builddir)/libctpp/libctpp.la
  10. LIBTOOL = @LIBTOOL@
  11. LIB_MAJOR_VERSION = @LIB_MAJOR_VERSION@
  12. LIB_MINOR_VERSION = @LIB_MINOR_VERSION@
  13. Index: ctalk-0.0.56/ctpp/builtins.c
  14. --- ctalk-0.0.56/ctpp/builtins.c.orig 2008-04-27 13:13:11 +0200
  15. +++ ctalk-0.0.56/ctpp/builtins.c 2008-04-28 08:14:42 +0200
  16. @@ -102,11 +102,12 @@
  17. * config file included above. See the comments in
  18. * config/linux-gnu-x86.c
  19. */
  20. +#if defined(__linux__) && defined(__i386__)
  21. for (i = 0; builtins[i]; i+=2) {
  22. sprintf (s, "#define %s %s\n", builtins[i], builtins[i+1]);
  23. tokenize_define (s);
  24. }
  25. -
  26. +#endif
  27. if (gcc_macros_opt) gcc_builtins ();
  28. @@ -115,9 +116,11 @@
  29. int is_builtin_symbol (char *name) {
  30. int i;
  31. +#if defined(__linux__) && defined(__i386__)
  32. for (i = 0; builtins[i]; i+=2) {
  33. if (!strcmp (name, builtins[i]))
  34. return TRUE;
  35. }
  36. +#endif
  37. return FALSE;
  38. }
  39. Index: ctalk-0.0.56/ctpp/ccompat.c
  40. --- ctalk-0.0.56/ctpp/ccompat.c.orig 2008-04-27 13:13:11 +0200
  41. +++ ctalk-0.0.56/ctpp/ccompat.c 2008-04-28 08:14:42 +0200
  42. @@ -55,8 +55,10 @@
  43. char cpp_subdir[FILENAME_MAX];
  44. +#if defined(__linux__) && defined(__i386__)
  45. extern char *host_os; /* Defined in builtins.c. */
  46. extern char *host_cpu;
  47. +#endif
  48. #if defined(__DJGPP__) || defined(__CYGWIN__)
  49. #define GCC_BIN "gcc.exe"
  50. @@ -147,7 +149,7 @@
  51. sol10_compat_defines ();
  52. #endif
  53. -#else
  54. +#elif defined(__linux__) && defined(__i386__)
  55. strcpy (cc_path, which ("cc"));
  56. cc_include_paths[1] = strdup ("/usr/include");
  57. Index: ctalk-0.0.56/ctpp/i_opt.c
  58. --- ctalk-0.0.56/ctpp/i_opt.c.orig 2008-04-27 13:13:11 +0200
  59. +++ ctalk-0.0.56/ctpp/i_opt.c 2008-04-28 08:14:42 +0200
  60. @@ -30,6 +30,8 @@
  61. #include <stdlib.h>
  62. #include <string.h>
  63. #include <errno.h>
  64. +#include <sys/types.h>
  65. +#include <sys/stat.h>
  66. #include "ctpp.h"
  67. extern char source_file[FILENAME_MAX]; /* Declared in rtinfo.c. */
  68. Index: ctalk-0.0.56/lib/rtinfo.c
  69. --- ctalk-0.0.56/lib/rtinfo.c.orig 2008-04-19 11:00:25 +0200
  70. +++ ctalk-0.0.56/lib/rtinfo.c 2008-04-28 08:14:42 +0200
  71. @@ -32,7 +32,7 @@
  72. #include "parser.h"
  73. extern char *tzname[2];
  74. -long int timezone;
  75. +long int ctalk_timezone;
  76. extern int daylight;
  77. RT_INFO rtinfo;
  78. Index: ctalk-0.0.56/libctpp/lex.c
  79. --- ctalk-0.0.56/libctpp/lex.c.orig 2008-04-27 13:13:12 +0200
  80. +++ ctalk-0.0.56/libctpp/lex.c 2008-04-28 08:14:42 +0200
  81. @@ -26,6 +26,8 @@
  82. #include <string.h>
  83. #include <ctype.h>
  84. #include <errno.h>
  85. +#include <sys/types.h>
  86. +#include <sys/stat.h>
  87. #include "ctpp.h"
  88. #include "typeof.h"
  89. #include "prtinfo.h"
  90. Index: ctalk-0.0.56/src/Makefile.in
  91. --- ctalk-0.0.56/src/Makefile.in.orig 2008-04-28 00:37:48 +0200
  92. +++ ctalk-0.0.56/src/Makefile.in 2008-04-28 08:19:08 +0200
  93. @@ -126,7 +126,7 @@
  94. LD = @LD@
  95. LDFLAGS = @LDFLAGS@
  96. LIBOBJS = @LIBOBJS@
  97. -LIBS = $(top_builddir)/lib/.libs/libctalk$(LIBEXT)
  98. +LIBS = $(top_builddir)/lib/libctalk.la
  99. LIBTOOL = @LIBTOOL@
  100. LIB_MAJOR_VERSION = @LIB_MAJOR_VERSION@
  101. LIB_MINOR_VERSION = @LIB_MINOR_VERSION@
  102. Index: ctpp-1.0.34/ctpp/Makefile.in
  103. --- ctpp-1.0.34/ctpp/Makefile.in.orig 2008-04-27 06:26:34 +0200
  104. +++ ctpp-1.0.34/ctpp/Makefile.in 2008-04-28 08:14:42 +0200
  105. @@ -120,7 +120,7 @@
  106. LD = @LD@
  107. LDFLAGS = @LDFLAGS@
  108. LIBOBJS = @LIBOBJS@
  109. -LIBS = $(top_builddir)/libctpp/.libs/libctpp$(LIBEXT)
  110. +LIBS = $(top_builddir)/libctpp/libctpp.la
  111. LIBTOOL = @LIBTOOL@
  112. LIB_MAJOR_VERSION = @LIB_MAJOR_VERSION@
  113. LIB_MINOR_VERSION = @LIB_MINOR_VERSION@
  114. Index: ctpp-1.0.34/ctpp/builtins.c
  115. --- ctpp-1.0.34/ctpp/builtins.c.orig 2008-03-25 21:32:00 +0100
  116. +++ ctpp-1.0.34/ctpp/builtins.c 2008-04-28 08:14:42 +0200
  117. @@ -102,11 +102,12 @@
  118. * config file included above. See the comments in
  119. * config/linux-gnu-x86.c
  120. */
  121. +#if defined(__linux__) && defined(__i386__)
  122. for (i = 0; builtins[i]; i+=2) {
  123. sprintf (s, "#define %s %s\n", builtins[i], builtins[i+1]);
  124. tokenize_define (s);
  125. }
  126. -
  127. +#endif
  128. if (gcc_macros_opt) gcc_builtins ();
  129. @@ -115,9 +116,11 @@
  130. int is_builtin_symbol (char *name) {
  131. int i;
  132. +#if defined(__linux__) && defined(__i386__)
  133. for (i = 0; builtins[i]; i+=2) {
  134. if (!strcmp (name, builtins[i]))
  135. return TRUE;
  136. }
  137. +#endif
  138. return FALSE;
  139. }
  140. Index: ctpp-1.0.34/ctpp/ccompat.c
  141. --- ctpp-1.0.34/ctpp/ccompat.c.orig 2008-03-26 08:53:09 +0100
  142. +++ ctpp-1.0.34/ctpp/ccompat.c 2008-04-28 08:14:42 +0200
  143. @@ -55,8 +55,10 @@
  144. char cpp_subdir[FILENAME_MAX];
  145. +#if defined(__linux__) && defined(__i386__)
  146. extern char *host_os; /* Defined in builtins.c. */
  147. extern char *host_cpu;
  148. +#endif
  149. #if defined(__DJGPP__) || defined(__CYGWIN__)
  150. #define GCC_BIN "gcc.exe"
  151. @@ -147,7 +149,7 @@
  152. sol10_compat_defines ();
  153. #endif
  154. -#else
  155. +#elif defined(__linux__) && defined(__i386__)
  156. strcpy (cc_path, which ("cc"));
  157. cc_include_paths[1] = strdup ("/usr/include");
  158. Index: ctpp-1.0.34/ctpp/i_opt.c
  159. --- ctpp-1.0.34/ctpp/i_opt.c.orig 2008-04-26 08:20:51 +0200
  160. +++ ctpp-1.0.34/ctpp/i_opt.c 2008-04-28 08:14:42 +0200
  161. @@ -30,6 +30,8 @@
  162. #include <stdlib.h>
  163. #include <string.h>
  164. #include <errno.h>
  165. +#include <sys/types.h>
  166. +#include <sys/stat.h>
  167. #include "ctpp.h"
  168. extern char source_file[FILENAME_MAX]; /* Declared in rtinfo.c. */
  169. Index: ctpp-1.0.34/libctpp/lex.c
  170. --- ctpp-1.0.34/libctpp/lex.c.orig 2008-01-01 16:05:53 +0100
  171. +++ ctpp-1.0.34/libctpp/lex.c 2008-04-28 08:14:42 +0200
  172. @@ -26,6 +26,8 @@
  173. #include <string.h>
  174. #include <ctype.h>
  175. #include <errno.h>
  176. +#include <sys/types.h>
  177. +#include <sys/stat.h>
  178. #include "ctpp.h"
  179. #include "typeof.h"
  180. #include "prtinfo.h"