ctalk.patch 5.6 KB

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