mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Corrected a build issue on OSX
This commit is contained in:
parent
70068d7d32
commit
606b782adf
@ -13,7 +13,7 @@
|
||||
|
||||
#include "h5misc.h"
|
||||
|
||||
#undef DEBUG
|
||||
#undef DEBUG
|
||||
|
||||
static int paramcheck(size_t nparams, const unsigned int* params);
|
||||
static void byteswap8(unsigned char* mem);
|
||||
@ -109,7 +109,7 @@ paramcheck(size_t nparams, const unsigned int* params)
|
||||
if(nparams != 14) {
|
||||
fprintf(stderr,"Too few parameters: need=16 sent=%ld\n",(unsigned long)nparams);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0;i<nparams;i++) {
|
||||
switch (i) {
|
||||
@ -140,7 +140,7 @@ paramcheck(size_t nparams, const unsigned int* params)
|
||||
i++; /* takes two parameters */
|
||||
if(bigendian)
|
||||
byteswap8((unsigned char*)&x);
|
||||
#ifdef _MSC_VER
|
||||
#if defined _MSC_VER || defined __APPLE__
|
||||
#define DBLVAL 12345678.12345678
|
||||
#else
|
||||
#define DBLVAL 12345678.12345678d
|
||||
|
@ -180,7 +180,7 @@ openfile(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(nerrs > 0) return NC_EFILTER;
|
||||
if(nerrs > 0) return NC_EFILTER;
|
||||
|
||||
/* Verify chunking */
|
||||
if(!verifychunks())
|
||||
@ -292,21 +292,21 @@ buildbaseline(unsigned int testcasenumber)
|
||||
baseline[0] = testcasenumber;
|
||||
switch (testcasenumber) {
|
||||
case 1:
|
||||
val4 = (unsigned int)-17;
|
||||
val4 = (unsigned int)-17;
|
||||
insert(1,&val4,sizeof(val4)); /* 1 signed int*/
|
||||
val4 = (unsigned int)23;
|
||||
val4 = (unsigned int)23;
|
||||
insert(2,&val4,sizeof(val4)); /* 2 unsigned int*/
|
||||
val4 = (unsigned int)-25;
|
||||
val4 = (unsigned int)-25;
|
||||
insert(3,&val4,sizeof(val4)); /* 3 signed int*/
|
||||
val4 = (unsigned int)27;
|
||||
val4 = (unsigned int)27;
|
||||
insert(4,&val4,sizeof(val4)); /* 4 unsigned int*/
|
||||
val4 = (unsigned int)77;
|
||||
val4 = (unsigned int)77;
|
||||
insert(5,&val4,sizeof(val4)); /* 5 signed int*/
|
||||
val4 = (unsigned int)93;
|
||||
insert(6,&val4,sizeof(val4)); /* 6 unsigned int*/
|
||||
float4 = 789.0f;
|
||||
insert(7,&float4,sizeof(float4)); /* 7 float */
|
||||
#ifdef _MSC_VER
|
||||
#if defined _MSC_VER || defined __APPLE__
|
||||
#define DBLVAL 12345678.12345678
|
||||
#else
|
||||
#define DBLVAL 12345678.12345678d
|
||||
@ -397,7 +397,7 @@ odom_offset(void)
|
||||
for(i=0;i<actualdims;i++) {
|
||||
offset *= dims[i];
|
||||
offset += odom[i];
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ expectedvalue(void)
|
||||
for(i=0;i<actualdims;i++) {
|
||||
offset *= dims[i];
|
||||
offset += odom[i];
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
@ -445,4 +445,3 @@ main(int argc, char **argv)
|
||||
if(!test_test1()) ERRR;
|
||||
exit(nerrs > 0?1:0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user