mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-12 18:10:24 +08:00
define mode_t when under windows
This commit is contained in:
parent
c9bb8c0abf
commit
d6061db87d
@ -721,15 +721,20 @@ simplenodematch34(CDFnode* node1, CDFnode* node2)
|
||||
/* Test all the obvious stuff */
|
||||
if(node1 == NULL || node2 == NULL)
|
||||
return 0;
|
||||
|
||||
/* Add hack to address the screwed up Columbia server
|
||||
which returns different Dataset {...} names
|
||||
depending on the constraint.
|
||||
*/
|
||||
if(FLAGSET(node1->root->tree->owner->controls,NCF_COLUMBIA)
|
||||
&& node1->nctype == NC_Dataset) return 1;
|
||||
|
||||
if(strcmp(node1->ocname,node2->ocname)!=0) /* same names */
|
||||
return 0;
|
||||
if(nclistlength(node1->array.dimset0)
|
||||
!= nclistlength(node2->array.dimset0)) /* same arity */
|
||||
return 0;
|
||||
|
||||
/* Add hack to address the screwed up Columbia server */
|
||||
if(node1->nctype == NC_Dataset) return 1;
|
||||
|
||||
if(node1->nctype != node2->nctype) {
|
||||
/* test for struct-grid match */
|
||||
int structgrid = ((node1->nctype == NC_Grid && node2->nctype == NC_Structure)
|
||||
|
15
libdap2/env
15
libdap2/env
@ -1,22 +1,20 @@
|
||||
PARMS=""; ARGS=""; CON="" ; CE=""; OCON="" ; VAR=""; SHARP='#'
|
||||
alias q0=;alias qq=;alias qv=;alias q=;alias qh=;alias qqh=;alias qall=;alias qv=;alias qo=;
|
||||
|
||||
#CON='xpos'
|
||||
#VAR=data
|
||||
|
||||
TOP="/home/dmh/mach/trunk"
|
||||
#TOP="/cygdrive/f/svn/trunk"
|
||||
#TOP="/cygdrive/c/Users/dmh/svn/trunk"
|
||||
|
||||
F="file://${TOP}/ncdap_test/testdata3/synth9"
|
||||
|
||||
PROG=./ncd
|
||||
#PROG="$TOP/ncdump/ncdump"
|
||||
|
||||
P=`pwd`
|
||||
|
||||
#F="http://iridl.ldeo.columbia.edu/SOURCES/.Models/.NMME/.NASA-GMAO/.MONTHLY/.sst/dods"
|
||||
|
||||
F="http://tiggeUser:tigge@thredds-test.ucar.edu/thredds/dodsC/restrict/testData.nc"
|
||||
|
||||
#CON='xpos'
|
||||
#VAR=data
|
||||
|
||||
PARMS="log"
|
||||
#PARMS="${PARMS}&netcdf3"
|
||||
#PARMS="${PARMS}&fetch=disk"
|
||||
@ -117,4 +115,7 @@ CON="U50M_EOSGRID_Data_Fields[0:23][282:282][441:441],XDim_EOSGRID"
|
||||
F="http://opendap.co-ops.nos.noaa.gov/dods/IOOS/SixMin_Verified_Water_Level"
|
||||
CON="&WATERLEVEL_6MIN_VFD_PX._STATION_ID=%228779770%22&WATERLEVEL_6MIN_VFD_PX._DATUM=%22MSL%22&WATERLEVEL_6MIN_VFD_PX._BEGIN_DATE=%2220061001%22&WATERLEVEL_6MIN_VFD_PX._END_DATE=%2220061030%22"
|
||||
|
||||
F="http://iridl.ldeo.columbia.edu/SOURCES/.Models/.NMME/.NASA-GMAO/.MONTHLY/.sst/dods"
|
||||
F="http://tiggeUser:tigge@thredds-test.ucar.edu/thredds/dodsC/restrict/testData.nc"
|
||||
F="http://iridl.ldeo.columbia.edu/SOURCES/.Models/.NMME/.NASA-GMAO/.MONTHLY/.sst/dods"
|
||||
fi
|
||||
|
@ -21,8 +21,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* Misc. code controls */
|
||||
#define FILLCONSTRAINT TRUE
|
||||
|
||||
/* Hopefully, this flag will someday not be needed */
|
||||
#define COLUMBIA_HACK "columbia.edu"
|
||||
|
||||
/* Use an extended version of the netCDF-4 type system */
|
||||
#define NC_URL 50
|
||||
@ -79,6 +82,9 @@ typedef unsigned int NCFLAGS;
|
||||
#define NCF_PREFETCH (0x0200) /* Cache prefetch enabled/disabled */
|
||||
#define NCF_PREFETCH_EAGER (0x0400) /* Do eager prefetch; 0=>lazy */
|
||||
#define NCF_PREFETCH_ALL (0x0800) /* Prefetch all variables */
|
||||
#ifdef COLUMBIA_HACK
|
||||
#define NCF_COLUMBIA (0x80000000) /* Hack for columbia server */
|
||||
#endif
|
||||
|
||||
/* Define all the default on flags */
|
||||
#define DFALT_ON_FLAGS (NCF_CACHE|NCF_PREFETCH)
|
||||
|
@ -124,6 +124,19 @@ NCD3_open(const char * path, int mode,
|
||||
if(!constrainable34(dapcomm->oc.url))
|
||||
SETFLAG(dapcomm->controls,NCF_UNCONSTRAINABLE);
|
||||
|
||||
#ifdef COLUMBIA_HACK
|
||||
{
|
||||
const char* p;
|
||||
/* Does this url look like it is from columbia? */
|
||||
if(dapcomm->oc.url->host != NULL) {
|
||||
for(p=dapcomm->oc.url->host;*p;p++) {
|
||||
if(strncmp(p,COLUMBIA_HACK,strlen(COLUMBIA_HACK))==0)
|
||||
SETFLAG(dapcomm->controls,NCF_COLUMBIA);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* fail if we are unconstrainable but have constraints */
|
||||
if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
|
||||
if(dapcomm->oc.url->constraint != NULL) {
|
||||
|
@ -30,8 +30,9 @@ if test "x$timing" = "x1" ; then leakcheck=0; fi
|
||||
|
||||
# get the list of test files
|
||||
# Currently C2 fails because server is not responding
|
||||
#WHICHTESTS="S1 C1 C2"
|
||||
WHICHTESTS="S1 C1"
|
||||
#WHICHTESTS="S1 C1 C2 CB"
|
||||
#WHICHTESTS="S1 C1 CB"
|
||||
WHICHTESTS="CB"
|
||||
if test -n "$longtests"; then
|
||||
WHICHTESTS="${WHICHTESTS} L1 LC1 LC2"
|
||||
fi
|
||||
@ -141,6 +142,10 @@ REMOTETESTSLC2="slp_aggregated;1;slp.slp[23255:23316][29:29][88:88]"
|
||||
# Unknown problem: test.07;2;&age>2
|
||||
IGNORE="test.07.2"
|
||||
|
||||
# Columbia hack test
|
||||
REMOTEURLCB="http://iridl.ldeo.columbia.edu/SOURCES/.Models/.NMME/.NASA-GMAO/.MONTHLY/.sst"
|
||||
REMOTETESTSCB="dods"
|
||||
|
||||
# Known to fail
|
||||
|
||||
XFAILTESTS3=""
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifdef __CYGWIN__
|
||||
#define TMPPATH1 "/cygdrive/c/temp/datadds"
|
||||
#define TMPPATH2 "./datadds"
|
||||
#elif _WIN32
|
||||
#elif defined(_WIN32) || defined(_WIN64)
|
||||
#define TMPPATH1 "c:\\temp\\datadds"
|
||||
#define TMPPATH2 ".\\datadds"
|
||||
#else
|
||||
@ -50,7 +50,7 @@ static int ocsetcurlproperties(OCstate*);
|
||||
|
||||
extern OCnode* makeunlimiteddimension(void);
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
@ -560,7 +560,6 @@ static int
|
||||
ocsetcurlproperties(OCstate* state)
|
||||
{
|
||||
CURLcode cstat = CURLE_OK;
|
||||
int stat;
|
||||
|
||||
/* process the triple store wrt to this state */
|
||||
if(ocdodsrc_process(state) != OC_NOERR) {
|
||||
@ -597,6 +596,7 @@ ocsetcurlproperties(OCstate* state)
|
||||
/* If no cookie file was defined, define a default */
|
||||
char* tmp;
|
||||
int fd;
|
||||
int stat;
|
||||
|
||||
tmp = (char*)malloc(strlen(ocglobalstate.home)
|
||||
+strlen("/")
|
||||
|
@ -13,6 +13,10 @@
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define mode_t int
|
||||
#endif
|
||||
|
||||
#include "ocinternal.h"
|
||||
#include "ocdebug.h"
|
||||
|
||||
@ -708,7 +712,7 @@ ocmktmp(const char* base, char** tmpnamep, int* fdp)
|
||||
snprintf(spid,sizeof(spid),"%06d",rno);
|
||||
if(!occoncat(tmpname,tmpsize,1,spid))
|
||||
return OC_EOVERRUN;
|
||||
# ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
fd=open(tmpname,O_RDWR|O_BINARY|O_CREAT|O_EXCL|FILE_ATTRIBUTE_TEMPORARY, _S_IREAD|_S_IWRITE);
|
||||
# else
|
||||
fd=open(tmpname,O_RDWR|O_CREAT|O_EXCL, S_IRWXU);
|
||||
|
Loading…
x
Reference in New Issue
Block a user