dtoolbase.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. /* C4250: 'myclass' : inherits 'baseclass::member' via dominance */
  28. #pragma warning (disable : 4250)
  29. /* C4355: 'this' : used in base member initializer list */
  30. #pragma warning (disable : 4355)
  31. #endif /* WIN32_VC */
  32. #include "dtoolsymbols.h"
  33. #ifdef HAVE_MALLOC_H
  34. #include <malloc.h>
  35. #endif
  36. #ifdef HAVE_ALLOCA_H
  37. #include <alloca.h>
  38. #endif
  39. #ifdef HAVE_UNISTD_H
  40. #include <unistd.h>
  41. #endif
  42. #ifdef HAVE_IO_H
  43. #include <io.h>
  44. #endif
  45. #ifdef HAVE_MINMAX_H
  46. #include <minmax.h>
  47. #endif
  48. #ifdef HAVE_SYS_TYPES_H
  49. #include <sys/types.h>
  50. #endif
  51. #ifdef CPPPARSER
  52. #include <stdtypedefs.h>
  53. #endif
  54. /*
  55. We define the macros BEGIN_PUBLISH and END_PUBLISH to bracket
  56. functions and global variable definitions that are to be published
  57. via interrogate to scripting languages.
  58. */
  59. #ifdef CPPPARSER
  60. #define BEGIN_PUBLISH __begin_publish
  61. #define END_PUBLISH __end_publish
  62. #else
  63. #define BEGIN_PUBLISH
  64. #define END_PUBLISH
  65. #endif
  66. #ifdef __cplusplus
  67. #include "dtoolbase_cc.h"
  68. #endif
  69. #endif