mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[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:
This commit is contained in:
parent
1ff1d02c68
commit
4d6d659c41
@ -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]; \
|
||||
|
Loading…
Reference in New Issue
Block a user