From 4d6d659c41fac755be1f77ccf853228097d15ec3 Mon Sep 17 00:00:00 2001 From: Leon Arber Date: Thu, 8 Dec 2005 16:44:55 -0500 Subject: [svn-r11778] Purpose: Bug fix. Description: For some strange reason, getopt() does not appear to be defined in unistd.h on colonelk when the source is compiled with -D_POSIX_SOURCE. Solution: Inserted some extern's for the missing variables to make the compiler happy. Platforms tested: colonelk, copper Misc. update: --- testpar/t_posix_compliant.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/testpar/t_posix_compliant.c b/testpar/t_posix_compliant.c index 17d7572..b863788 100644 --- a/testpar/t_posix_compliant.c +++ b/testpar/t_posix_compliant.c @@ -32,21 +32,23 @@ * larber@ncsa.uiuc.edu */ -#include -#include -#include #include +#include #include -#ifdef _POSIX_SOURCE -#include -#endif +#include +#include #include "h5test.h" - static char* testfile = NULL; static int err_flag = 0; static int max_err_print = 5; +/* globals needed for getopt + * Although they *should* be defined in unistd.h */ +extern char *optarg; +extern int optind, opterr; + + #define CHECK_SUCCESS(res) \ { \ char err_got[MPI_MAX_ERROR_STRING]; \ -- cgit v0.12