2011-07-15 06:24:02 +08:00
|
|
|
/*
|
2018-12-07 05:13:56 +08:00
|
|
|
* Copyright 2018 University Corporation for Atmospheric
|
2011-07-15 06:24:02 +08:00
|
|
|
* Research/Unidata. See COPYRIGHT file for more info.
|
|
|
|
*
|
|
|
|
* This header file is for the parallel I/O functions of netCDF.
|
2014-08-26 05:14:10 +08:00
|
|
|
*
|
2011-07-15 06:24:02 +08:00
|
|
|
*/
|
|
|
|
/* "$Id: netcdf_par.h,v 1.1 2010/06/01 15:46:49 ed Exp $" */
|
|
|
|
|
|
|
|
#ifndef NCCONFIGURE_H
|
|
|
|
#define NCCONFIGURE_H 1
|
|
|
|
|
2017-11-24 01:55:24 +08:00
|
|
|
#ifdef HAVE_STDLIB_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#endif
|
|
|
|
|
2011-07-15 06:24:02 +08:00
|
|
|
/*
|
|
|
|
This is included in bottom
|
|
|
|
of config.h. It is where,
|
|
|
|
typically, alternatives to
|
|
|
|
missing functions should be
|
2018-02-25 11:36:24 +08:00
|
|
|
defined and missing types defined.
|
2011-07-15 06:24:02 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HAVE_STRDUP
|
|
|
|
extern char* strdup(const char*);
|
|
|
|
#endif
|
|
|
|
|
2018-03-27 05:35:48 +08:00
|
|
|
/*
|
2018-02-25 11:36:24 +08:00
|
|
|
#ifndef HAVE_SSIZE_T
|
2018-03-27 05:35:48 +08:00
|
|
|
typedef long ssize_t;
|
|
|
|
#define HAVE_SSIZE_T
|
2018-02-25 11:36:24 +08:00
|
|
|
#endif
|
2018-03-27 05:35:48 +08:00
|
|
|
*/
|
2011-07-15 06:24:02 +08:00
|
|
|
/* handle null arguments */
|
2011-09-30 23:56:02 +08:00
|
|
|
#ifndef nulldup
|
|
|
|
#ifdef HAVE_STRDUP
|
|
|
|
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
|
|
|
#else
|
|
|
|
char *nulldup(const char* s);
|
|
|
|
#endif
|
2014-08-26 05:14:10 +08:00
|
|
|
#endif
|
2011-09-30 23:56:02 +08:00
|
|
|
|
2018-03-27 05:35:48 +08:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#ifndef HAVE_SSIZE_T
|
|
|
|
#include <basetsd.h>
|
|
|
|
typedef SSIZE_T ssize_t;
|
2018-05-15 04:37:07 +08:00
|
|
|
#define HAVE_SSIZE_T 1
|
2018-03-27 05:35:48 +08:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-11-24 01:55:24 +08:00
|
|
|
#ifndef HAVE_STRLCAT
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
/* Windows strlcat_s is equivalent to strlcat, but different arg order */
|
|
|
|
#define strlcat(d,s,n) strcat_s((d),(n),(s))
|
|
|
|
#else
|
|
|
|
extern size_t strlcat(char* dst, const char* src, size_t dsize);
|
|
|
|
#endif
|
|
|
|
#endif
|
2011-09-30 23:56:02 +08:00
|
|
|
|
2011-07-15 06:24:02 +08:00
|
|
|
#ifndef nulldup
|
|
|
|
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
|
|
|
|
#endif
|
|
|
|
#ifndef nulllen
|
|
|
|
#define nulllen(s) ((s)==NULL?0:strlen(s))
|
|
|
|
#endif
|
2011-07-15 06:43:43 +08:00
|
|
|
#ifndef nullfree
|
|
|
|
#define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
|
|
|
|
#endif
|
2011-07-15 06:24:02 +08:00
|
|
|
|
|
|
|
#ifndef HAVE_UCHAR
|
|
|
|
typedef unsigned char uchar;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_LONGLONG
|
|
|
|
typedef long long longlong;
|
|
|
|
typedef unsigned long long ulonglong;
|
|
|
|
#endif
|
|
|
|
|
2015-08-16 06:26:35 +08:00
|
|
|
#ifndef HAVE_USHORT
|
|
|
|
typedef unsigned short ushort;
|
|
|
|
#endif
|
|
|
|
|
2011-07-15 06:24:02 +08:00
|
|
|
#ifndef HAVE_UINT
|
|
|
|
typedef unsigned int uint;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* NCCONFIGURE_H */
|