From 4e815f856577112dd981b7a88bd4067151e5aef5 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 20 May 2001 18:06:57 +0000 Subject: [PATCH] local declares if the header is missing. --- configure.in | 2 +- driver/main.c | 21 ++++++++++++++++++++- ivlpp/main.c | 11 ++++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index df6280bf8..905b11efc 100644 --- a/configure.in +++ b/configure.in @@ -15,7 +15,7 @@ fi AC_LANG_CPLUSPLUS -AC_CHECK_HEADERS(getopt.h iosfwd) +AC_CHECK_HEADERS(getopt.h iosfwd sys/wait.h) AC_CHECK_HEADER(ipal.h, HAVE_IPAL=yes, HAVE_IPAL=) AC_SUBST(HAVE_IPAL) diff --git a/driver/main.c b/driver/main.c index 099d9134a..43604a5a8 100644 --- a/driver/main.c +++ b/driver/main.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: main.c,v 1.11 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: main.c,v 1.12 2001/05/20 18:06:57 steve Exp $" #endif const char HELP[] = @@ -37,7 +37,9 @@ See man page for details."; #include #include +#ifdef HAVE_SYS_WAIT_H #include +#endif #ifdef __MINGW32__ #include @@ -47,6 +49,20 @@ See man page for details."; #include #endif +#if defined(__MINGW32__) && !defined(HAVE_GETOPT_H) +extern int getopt(int argc, char*argv[], const char*fmt); +extern int optind; +extern const char*optarg; +#endif + +#if !defined(WIFEXITED) +# define WIFEXITED(rc) ((rc&~0xff) == 0) +#endif + +#if !defined(WEXITSTATUS) +# define WEXITSTATUS(rc) (rc) +#endif + #ifndef IVL_ROOT # define IVL_ROOT "." #endif @@ -580,6 +596,9 @@ int main(int argc, char **argv) /* * $Log: main.c,v $ + * Revision 1.12 2001/05/20 18:06:57 steve + * local declares if the header is missing. + * * Revision 1.11 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/ivlpp/main.c b/ivlpp/main.c index 199a76eb5..189884436 100644 --- a/ivlpp/main.c +++ b/ivlpp/main.c @@ -17,7 +17,7 @@ const char COPYRIGHT[] = * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: main.c,v 1.8 2000/12/06 05:15:21 steve Exp $" +#ident "$Id: main.c,v 1.9 2001/05/20 18:08:07 steve Exp $" #endif const char NOTICE[] = @@ -47,6 +47,12 @@ const char VERSION[] = "$Name: $ $State: Exp $"; #endif # include "globals.h" +#if defined(__MINGW32__) && !defined(HAVE_GETOPT_H) +extern int getopt(int argc, char*argv[], const char*fmt); +extern int optind; +extern const char*optarg; +#endif + char**include_dir = 0; unsigned include_cnt = 0; @@ -177,6 +183,9 @@ int main(int argc, char*argv[]) /* * $Log: main.c,v $ + * Revision 1.9 2001/05/20 18:08:07 steve + * local declares if the header is missing. + * * Revision 1.8 2000/12/06 05:15:21 steve * fix portfaults pass values. *