* tools/if_mach.c (main): Remove unused "envp" argument.
* tools/if_not_there.c (main): Likewise.
* tools/if_mach.c: Expand tabs to spaces.
* tools/if_not_there.c: Likewise.
* tools/setjmp_t.c (getpagesize): Define for Win32; include windows.h.
* tools/setjmp_t.c (main): Make printf() format specifier string
non-empty (to suppress compiler warning).
* tools/setjmp_t.c (main): Adjust printf() format specifier for WORDSZ
value (unsigned long instead of int).
# include <string.h>
# include <unistd.h>
-int main(int argc, char **argv, char **envp)
+int main(int argc, char **argv)
{
if (argc < 4) goto Usage;
if (strcmp(MACH_TYPE, argv[1]) != 0) return(0);
Usage:
fprintf(stderr, "Usage: %s mach_type os_type command\n", argv[0]);
fprintf(stderr, "Currently mach_type = %s, os_type = %s\n",
- MACH_TYPE, OS_TYPE);
+ MACH_TYPE, OS_TYPE);
return(1);
}
/* Conditionally execute a command based if the file argv[1] doesn't exist */
-/* Except for execvp, we stick to ANSI C. */
+/* Except for execvp, we stick to ANSI C. */
# include "private/gcconfig.h"
# include <stdio.h>
# include <stdlib.h>
#include <dirent.h>
#endif /* __DJGPP__ */
-int main(int argc, char **argv, char **envp)
+int main(int argc, char **argv)
{
FILE * f;
#ifdef __DJGPP__
}
#ifdef __DJGPP__
if ((d = opendir(argv[1])) != 0) {
- closedir(d);
- return(0);
+ closedir(d);
+ return(0);
}
#endif
printf("^^^^Starting command^^^^\n");
}
return((int)(result[0]));
}
+#elif defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
+# include <windows.h>
+ int getpagesize(void)
+ {
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo(&sysinfo);
+ return sysinfo.dwPageSize;
+ }
#endif
struct {
printf("Results may not be accurate/useful:\n");
/* Encourage the compiler to keep x in a callee-save register */
x = 2*x-1;
- printf("");
+ printf("\n");
x = 2*x-1;
setjmp(b);
if (y == 1) {
x = 2;
if (y == 1) longjmp(b,1);
printf("Some GC internal configuration stuff: \n");
- printf("\tWORDSZ = %d, ALIGNMENT = %d, GC_GRANULE_BYTES = %d\n",
+ printf("\tWORDSZ = %lu, ALIGNMENT = %d, GC_GRANULE_BYTES = %d\n",
WORDSZ, ALIGNMENT, GC_GRANULE_BYTES);
printf("\tUsing one mark ");
# if defined(USE_MARK_BYTES)