Based on the original Rocket Workbench on SourceForge in CVS at: https://sourceforge.net/projects/rocketworkbench
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.2 KiB

  1. #ifndef COMPAT_H
  2. #define COMPAT_H
  3. /*
  4. Checking for _MSC_VER will detect whether MSVC++ is being used.
  5. I don't know of the other compiler flags, so others will want to
  6. add to this for their own compilers.
  7. Mark Pinese 24/4/2000
  8. */
  9. #ifdef _MSC_VER
  10. /* MSVC++ 6.0 Std */
  11. #define STRNCASECMP _strnicmp
  12. /* add for MSVC++ 5.0 */
  13. #define STRCASECMP _stricmp
  14. #ifdef _DEBUG
  15. #include <crtdbg.h>
  16. #endif /* defined (_DEBUG) */
  17. #ifndef __cplusplus
  18. typedef enum
  19. {
  20. false = 0,
  21. true = 1
  22. } bool;
  23. #endif /* !defined (__cplusplus) */
  24. #endif /* define _MSC_VER */
  25. #ifdef GCC
  26. #define STRCASECMP strcasecmp
  27. #define STRNCASECMP strncasecmp
  28. #define __min(a, b) ( (a) <= (b) ? (a) : (b))
  29. #define __max(a, b) ( (a) >= (b) ? (a) : (b))
  30. typedef enum
  31. {
  32. false = 0,
  33. true = 1
  34. } bool;
  35. #endif /* define GCC */
  36. #ifdef BORLAND
  37. int StrNCaseCmp(const char *s1, const char *s2, size_t sz);
  38. #define STRNCASECMP StrNCaseCmp
  39. #define __min(a, b) ( (a) <= (b) ? (a) : (b))
  40. #define __max(a, b) ( (a) >= (b) ? (a) : (b))
  41. typedef enum
  42. {
  43. false = 0,
  44. true = 1
  45. } bool;
  46. #endif /* define BORLAND */
  47. #endif /* !defined(COMPAT_H) */