diff --git a/nc_test/test_read.m4 b/nc_test/test_read.m4 index 77009f311..a091b3fe7 100644 --- a/nc_test/test_read.m4 +++ b/nc_test/test_read.m4 @@ -33,10 +33,6 @@ dnl #endif #include /* errno, strerror() */ -#ifndef HAVE_SSIZE_T -typedef int ssize_t; -#endif - #include "tests.h" define(`EXPECT_ERR',`error("expecting $1 but got %s",nc_err_code_name($2));')dnl diff --git a/nc_test/test_write.m4 b/nc_test/test_write.m4 index 1c47f10d2..f43294f38 100644 --- a/nc_test/test_write.m4 +++ b/nc_test/test_write.m4 @@ -35,10 +35,6 @@ dnl #include "tests.h" #include "math.h" -#ifndef HAVE_SSIZE_T -typedef int ssize_t; -#endif - define(`EXPECT_ERR',`error("expecting $1 but got %s",nc_err_code_name($2));')dnl define(`IntType', `ifdef(`PNETCDF',`MPI_Offset',`size_t')')dnl diff --git a/nc_test/tests.h b/nc_test/tests.h index 2e24295a5..908fabcd3 100644 --- a/nc_test/tests.h +++ b/nc_test/tests.h @@ -18,6 +18,10 @@ #endif #include "error.h" +#ifndef HAVE_SSIZE_T +typedef int ssize_t; +#endif + #if defined(_CRAY) && !defined(_CRAYIEEE) && !defined(__crayx1) #define CRAYFLOAT 1 /* CRAY Floating point */ #elif defined(_SX) && defined(_FLOAT2) /* NEC SUPER-UX in CRAY mode */