mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Fix preprocessor for mingw
This commit is contained in:
parent
9c4777c092
commit
3303ccd519
@ -11,15 +11,15 @@
|
||||
* "allocate" arrays on the stack where possible.
|
||||
* (Where not possible, malloc and free are used.)
|
||||
*
|
||||
* The macro ALLOC_ONSTACK(name, type, nelems) is used to declare
|
||||
* The macro ALLOC_ONSTACK(name, type, nelems) is used to declare
|
||||
* an array of 'type' named 'name' which is 'nelems' long.
|
||||
* FREE_ONSTACK(name) is placed at the end of the scope of 'name'
|
||||
* to call 'free' if necessary.
|
||||
*
|
||||
*
|
||||
* The macro ALLOC_ONSTACK wraps a call to alloca() on most systems.
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#undef HAVE_ALLOCA
|
||||
#define HAVE_ALLOCA 1
|
||||
@ -80,5 +80,5 @@
|
||||
free(name)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _ONSTACK_H_ */
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user