ncconfigure.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright 2010 University Corporation for Atmospheric
  3. * Research/Unidata. See COPYRIGHT file for more info.
  4. *
  5. * This header file is for the parallel I/O functions of netCDF.
  6. *
  7. */
  8. /* "$Id: netcdf_par.h,v 1.1 2010/06/01 15:46:49 ed Exp $" */
  9. #ifndef NCCONFIGURE_H
  10. #define NCCONFIGURE_H 1
  11. /*
  12. This is included in bottom
  13. of config.h. It is where,
  14. typically, alternatives to
  15. missing functions should be
  16. defined.
  17. */
  18. #ifndef HAVE_STRDUP
  19. extern char* strdup(const char*);
  20. #endif
  21. /* handle null arguments */
  22. #ifndef nulldup
  23. #ifdef HAVE_STRDUP
  24. #define nulldup(s) ((s)==NULL?NULL:strdup(s))
  25. #else
  26. char *nulldup(const char* s);
  27. #endif
  28. #endif
  29. #ifndef nulldup
  30. #define nulldup(s) ((s)==NULL?NULL:strdup(s))
  31. #endif
  32. #ifndef nulllen
  33. #define nulllen(s) ((s)==NULL?0:strlen(s))
  34. #endif
  35. #ifndef nullfree
  36. #define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
  37. #endif
  38. #ifndef HAVE_UCHAR
  39. typedef unsigned char uchar;
  40. #endif
  41. #ifndef HAVE_LONGLONG
  42. typedef long long longlong;
  43. typedef unsigned long long ulonglong;
  44. #endif
  45. #ifndef HAVE_UINT
  46. typedef unsigned int uint;
  47. #endif
  48. #endif /* NCCONFIGURE_H */