Mail Archives: djgpp-workers/2003/07/18/23:44:20
Includes the linux cross build patch and fixes for the $$ bash pid problem:
(I generated it on the plane, so not exactly like other suggestions).
--- dxe3gen.c_ Wed May 14 11:00:04 2003
+++ dxe3gen.c Fri Jul 18 02:45:36 2003
@@ -27,2 +27,4 @@
#else
+/* Linux violates POSIX.1 and defines this, but it shouldn't. We fix it. */
+#undef _POSIX_SOURCE
#include "../../include/sys/dxe.h"
@@ -33,4 +35,5 @@
-#define TEMP_O_FILE "$$dxe$$.o"
-#define TEMP_S_FILE "$$dxe$$.s"
+#define TEMP_BASE "dxe_tmp" /* 7 chars, 1 char suffix */
+#define TEMP_O_FILE TEMP_BASE".o"
+#define TEMP_S_FILE TEMP_BASE".s"
@@ -457,12 +460,12 @@
if (init > 0) {
- f = fopen("$$dxe$$i.o", "wb");
+ f = fopen(TEMP_BASE"i.o", "wb");
fwrite(inits[init-1].data, inits[init-1].size, 1, f);
fclose(f);
- argv[i++] = "$$dxe$$i.o";
+ argv[i++] = TEMP_BASE"i.o";
}
if (fini > 0) {
- f = fopen("$$dxe$$f.o", "wb");
+ f = fopen(TEMP_BASE"f.o", "wb");
fwrite(finis[fini-1].data, finis[fini-1].size, 1, f);
fclose(f);
- argv[i++] = "$$dxe$$f.o";
+ argv[i++] = TEMP_BASE"f.o";
}
@@ -473,6 +476,6 @@
if (init > 0) {
- remove("$$dxe$$i.o");
+ remove(TEMP_BASE"i.o");
}
if (fini > 0) {
- remove("$$dxe$$f.o");
+ remove(TEMP_BASE"f.o");
}
@@ -925,3 +928,3 @@
/* Fire the resolver. It should take care of the dependencies (if any) */
- strcpy(cmdbuf, "dxe3res -o $$dxe$$.c ");
+ strcpy(cmdbuf, "dxe3res -o "TEMP_BASE".c ");
strcat(cmdbuf, opt.dxefile);
@@ -935,4 +938,4 @@
/* Pre-compile the resolver's output. */
- rv = system("gcc -o "TEMP_S_FILE" -O2 -S $$dxe$$.c");
- remove("$$dxe$$.c");
+ rv = system("gcc -o "TEMP_S_FILE" -O2 -S "TEMP_BASE".c");
+ remove(TEMP_BASE".c");
if (rv != 0) {
- Raw text -