summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Arber <larber@ncsa.uiuc.edu>2005-12-08 21:44:55 (GMT)
committerLeon Arber <larber@ncsa.uiuc.edu>2005-12-08 21:44:55 (GMT)
commit4d6d659c41fac755be1f77ccf853228097d15ec3 (patch)
treebb7f67b17b70f19fc90c90badbe47a7b23dc2a84
parent1ff1d02c683e6314200e8fc90fbb36e238185fb1 (diff)
downloadhdf5-4d6d659c41fac755be1f77ccf853228097d15ec3.zip
hdf5-4d6d659c41fac755be1f77ccf853228097d15ec3.tar.gz
hdf5-4d6d659c41fac755be1f77ccf853228097d15ec3.tar.bz2
[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:
-rw-r--r--testpar/t_posix_compliant.c16
1 files 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 <mpi.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
+#include <stdio.h>
#include <string.h>
-#ifdef _POSIX_SOURCE
-#include <getopt.h>
-#endif
+#include <stdlib.h>
+#include <mpi.h>
#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]; \