dtoolbase.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Filename: dtoolbase.h
  3. * Created by: drose (12Sep00)
  4. *
  5. */
  6. /* This file is included at the beginning of every header file and/or
  7. C or C++ file. It must be compilable for C as well as C++ files,
  8. so no C++-specific code or syntax can be put here. See
  9. dtoolbase_cc.h for C++-specific stuff. */
  10. #ifndef DTOOLBASE_H
  11. #define DTOOLBASE_H
  12. #include <dtool_config.h>
  13. #ifdef WIN32_VC
  14. /* These warning pragmas must appear before anything else for VC++ to
  15. respect them. Sheesh. */
  16. /* C4231: extern before template instantiation */
  17. /* For some reason, this particular warning won't disable. */
  18. #pragma warning (disable : 4231)
  19. /* C4786: 255 char debug symbols */
  20. #pragma warning (disable : 4786)
  21. /* C4251: needs dll interface */
  22. #pragma warning (disable : 4251)
  23. /* C4503: decorated name length exceeded */
  24. #pragma warning (disable : 4503)
  25. /* C4305: truncation from 'const double' to 'float' */
  26. #pragma warning (disable : 4305)
  27. #endif /* WIN32_VC */
  28. #include "dtoolsymbols.h"
  29. #ifdef HAVE_MALLOC_H
  30. #include <malloc.h>
  31. #endif
  32. #ifdef HAVE_ALLOCA_H
  33. #include <alloca.h>
  34. #endif
  35. #ifdef HAVE_UNISTD_H
  36. #include <unistd.h>
  37. #endif
  38. #ifdef HAVE_IO_H
  39. #include <io.h>
  40. #endif
  41. #ifdef HAVE_MINMAX_H
  42. #include <minmax.h>
  43. #endif
  44. #ifdef HAVE_SYS_TYPES_H
  45. #include <sys/types.h>
  46. #endif
  47. #ifdef CPPPARSER
  48. #include <stdtypedefs.h>
  49. #endif
  50. /*
  51. We define the macros BEGIN_PUBLISH and END_PUBLISH to bracket
  52. functions and global variable definitions that are to be published
  53. via interrogate to scripting languages.
  54. */
  55. #ifdef CPPPARSER
  56. #define BEGIN_PUBLISH __begin_publish
  57. #define END_PUBLISH __end_publish
  58. #else
  59. #define BEGIN_PUBLISH
  60. #define END_PUBLISH
  61. #endif
  62. #ifdef __cplusplus
  63. #include "dtoolbase_cc.h"
  64. #endif
  65. #endif