fix for getopt problems on hydra
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Aug 11 12:27:44 AEST 1998
This is for Tom.
runtime/mercury_getopt.c:
runtime/mercury_getopt1.c:
Add the files as produced by process_getopt.
runtime/process_getopt:
runtime/mercury_getopt.h:
Avoid a warning if the environment already defines __GNU_LIBRARY__,
and prevent this from omitting the entire bodies of the source files
:-(.
util/getopt.h:
A copy of the old mercury_getopt.h for mkinit.c
util/mkinit.c:
Include getopt.h instead of mercury_getopt.h, since we want getopt(),
not MR_getopt().
Zoltan.
cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/exceptions
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/Togl-1.2
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing profiler
cvs diff: Diffing runtime
Index: runtime/mercury_getopt.c
===================================================================
RCS file: mercury_getopt.c
diff -N mercury_getopt.c
--- /dev/null Wed May 28 10:49:58 1997
+++ mercury_getopt.c Tue Aug 11 12:23:57 1998
<the output of process_getopt>
Index: runtime/mercury_getopt.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_getopt.h,v
retrieving revision 1.3
diff -u -u -r1.3 mercury_getopt.h
--- mercury_getopt.h 1998/08/10 07:17:43 1.3
+++ mercury_getopt.h 1998/08/11 02:23:57
@@ -1,3 +1,4 @@
+#undef __GNU_LIBRARY__
#define __GNU_LIBRARY__
/* Declarations for MR_getopt.
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
Index: runtime/mercury_getopt1.c
===================================================================
RCS file: mercury_getopt1.c
diff -N mercury_getopt1.c
--- /dev/null Wed May 28 10:49:58 1997
+++ mercury_getopt1.c Tue Aug 11 12:23:57 1998
<the output of process_getopt>
Index: runtime/process_getopt
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/process_getopt,v
retrieving revision 1.1
diff -u -u -r1.1 process_getopt
--- process_getopt 1998/08/10 07:17:56 1.1
+++ process_getopt 1998/08/11 02:23:26
@@ -15,6 +15,7 @@
g/\<optopt/s//MR_optopt/g
g/\<option/s//MR_option/g
g/\<_getopt/s//MR__getopt/g
+ g/#ifndef/s/ELIDE_CODE/XXXELIDE_CODEXXX/
w
q
END
@@ -23,6 +24,7 @@
echo finalizing mercury_getopt.h
ex mercury_getopt.h << END
1i
+#undef __GNU_LIBRARY__
#define __GNU_LIBRARY__
.
w
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/general
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trial
cvs diff: Diffing util
Index: util/getopt.h
===================================================================
RCS file: getopt.h
diff -N getopt.h
--- /dev/null Wed May 28 10:49:58 1997
+++ getopt.h Tue Aug 11 12:19:51 1998
<the old mercury_getopt.h>
Index: util/mkinit.c
===================================================================
RCS file: /home/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.39
diff -u -u -r1.39 mkinit.c
--- mkinit.c 1998/07/31 15:14:25 1.39
+++ mkinit.c 1998/08/11 02:25:41
@@ -23,7 +23,7 @@
#include <string.h>
#include <ctype.h>
#include <errno.h>
-#include "mercury_getopt.h"
+#include "getopt.h"
#include "mercury_conf.h"
#include "mercury_std.h"
@@ -185,12 +185,10 @@
"}\n"
;
-
static const char if_need_to_init[] =
"#if defined(MR_MAY_NEED_INITIALIZATION)\n\n"
;
-
/* --- function prototypes --- */
static void parse_options(int argc, char *argv[]);
static void usage(void);
@@ -250,10 +248,10 @@
fputs("/* Force syntax error, since there were */\n", stdout);
fputs("/* errors in the generation of this file */\n", stdout);
fputs("#error \"You need to remake this file\"\n", stdout);
- exit(1);
+ return EXIT_FAILURE;
}
- exit(0);
+ return EXIT_SUCCESS;
}
/*---------------------------------------------------------------------------*/
More information about the developers
mailing list