fix-build.diff 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. diff --git a/H/globals.h b/H/globals.h
  2. index 223d015..953ff41 100644
  3. --- a/H/globals.h
  4. +++ b/H/globals.h
  5. @@ -49,6 +49,7 @@
  6. #endif
  7. #define _ltoa ltoa
  8. #define _strupr strupr
  9. +extern char *strupr(char *);
  10. #elif defined(__POCC__)
  11. @@ -946,4 +947,11 @@ extern char *num2hex64(uint_64 value, char *buffer);
  12. extern char *ConvertSectionName( const struct asym *, enum seg_type *pst, char *buffer );
  13. extern void RewindToWin64(void);
  14. +extern void CreateMacroLibCases64(void);
  15. +extern void CreateMacroLibCases32(void);
  16. +extern void OutputInterleavedBytes(const unsigned char *pbytes, int len, struct fixup *fixup);
  17. +extern void SymSimd(struct dsym *sym);
  18. +extern void RunLineQueue( void );
  19. +extern ret_code BackPatch( struct asym *sym );
  20. +
  21. #endif
  22. diff --git a/assemble.c b/assemble.c
  23. index 2ce0e14..a9f2899 100644
  24. --- a/assemble.c
  25. +++ b/assemble.c
  26. @@ -43,7 +43,7 @@
  27. #include "lqueue.h"
  28. #include "orgfixup.h"
  29. #include "macrolib.h"
  30. -//#include "simd.h"
  31. +#include "simd.h"
  32. #if DLLIMPORT
  33. #include "mangle.h"
  34. diff --git a/codegenv2.c b/codegenv2.c
  35. index 6bcc08d..7063c27 100644
  36. --- a/codegenv2.c
  37. +++ b/codegenv2.c
  38. @@ -1,6 +1,7 @@
  39. #include "codegenv2.h"
  40. +#include <ctype.h>
  41. #include <time.h>
  42. #include "globals.h"
  43. #include "parser.h"
  44. @@ -12,6 +13,7 @@
  45. #include "types.h"
  46. #include "macro.h"
  47. #include "listing.h"
  48. +#include "input.h"
  49. #define OutputCodeByte( x ) OutputByte( x )
  50. diff --git a/macho64.c b/macho64.c
  51. index 8e74842..8b81d5e 100644
  52. --- a/macho64.c
  53. +++ b/macho64.c
  54. @@ -725,7 +725,7 @@ static ret_code macho_write_module( struct module_info *modinfo )
  55. mm.header.cputype = CPU_TYPE_X86_64;
  56. mm.header.cpusubtype = CPU_SUBTYPE_LITTLE_ENDIAN | CPU_SUBTYPE_X86_64_ALL;
  57. mm.header.filetype = MH_OBJECT;
  58. - mm.header.flags = NULL;
  59. + mm.header.flags = 0;
  60. macho_build_structures(modinfo, mm);
  61. }
  62. diff --git a/proc.c b/proc.c
  63. index a984bb9..16307b3 100644
  64. --- a/proc.c
  65. +++ b/proc.c
  66. @@ -162,10 +162,12 @@ struct delphicall_conv {
  67. static int ms32_pcheck(struct dsym *, struct dsym *, int *);
  68. +static int ms32_syspcheck(struct dsym *, struct dsym *, int *, int *);
  69. static void ms32_return(struct dsym *, char *);
  70. #if OWFC_SUPPORT
  71. static int watc_pcheck(struct dsym *, struct dsym *, int *);
  72. +static int watc_syspcheck(struct dsym *, struct dsym *, int *, int *);
  73. static void watc_return(struct dsym *, char *);
  74. #endif
  75. @@ -212,9 +214,9 @@ static const struct vectorcall_conv vectorcall_tab[] = {
  76. };
  77. static const struct sysvcall_conv sysvcall_tab[] = {
  78. - { ms32_pcheck, ms32_return }, /* FCT_MSC */
  79. + { ms32_syspcheck, ms32_return }, /* FCT_MSC */
  80. #if OWFC_SUPPORT
  81. - { watc_pcheck, watc_return }, /* FCT_WATCOMC */
  82. + { watc_syspcheck, watc_return }, /* FCT_WATCOMC */
  83. #endif
  84. #if SYSV_SUPPORT
  85. { sysv_pcheck, sysv_return } /* FCT_WIN64 / SYSTEMV */
  86. @@ -380,6 +382,11 @@ static int watc_pcheck(struct dsym *proc, struct dsym *paranode, int *used)
  87. return(1);
  88. }
  89. +static int watc_syspcheck(struct dsym *proc, struct dsym *paranode, int *used, int *vecused)
  90. +{
  91. + return watc_pcheck(proc, paranode, used);
  92. +}
  93. +
  94. static void watc_return(struct dsym *proc, char *buffer)
  95. /********************************************************/
  96. {
  97. @@ -433,6 +440,11 @@ static int ms32_pcheck(struct dsym *proc, struct dsym *paranode, int *used)
  98. return(1);
  99. }
  100. +static int ms32_syspcheck(struct dsym *proc, struct dsym *paranode, int *used, int *vecused)
  101. +{
  102. + return ms32_pcheck(proc, paranode, used);
  103. +}
  104. +
  105. static void ms32_return(struct dsym *proc, char *buffer)
  106. /********************************************************/
  107. {