config.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Configuration file for Mini-XML, a small XML file parsing library.
  3. *
  4. * Copyright 2003-2019 by Michael R Sweet.
  5. *
  6. * These coded instructions, statements, and computer programs are the
  7. * property of Michael R Sweet and are protected by Federal copyright
  8. * law. Distribution and use rights are outlined in the file "COPYING"
  9. * which should have been included with this file. If this file is
  10. * missing or damaged, see the license at:
  11. *
  12. * https://michaelrsweet.github.io/mxml
  13. */
  14. /*
  15. * Include necessary headers...
  16. */
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <string.h>
  20. #include <stdarg.h>
  21. #include <ctype.h>
  22. /*
  23. * Version number...
  24. */
  25. #define MXML_VERSION "3.0"
  26. /*
  27. * Inline function support...
  28. */
  29. #define inline
  30. /*
  31. * Long long support...
  32. */
  33. #define HAVE_LONG_LONG 1
  34. /*
  35. * Do we have the *printf() functions?
  36. */
  37. #undef HAVE_SNPRINTF
  38. #undef HAVE_VASPRINTF
  39. #undef HAVE_VSNPRINTF
  40. /*
  41. * Do we have the strXXX() functions?
  42. */
  43. #undef HAVE_STRDUP
  44. #undef HAVE_STRLCAT
  45. #undef HAVE_STRLCPY
  46. /*
  47. * Do we have threading support?
  48. */
  49. #undef HAVE_PTHREAD_H
  50. /*
  51. * Define prototypes for string functions as needed...
  52. */
  53. # ifndef HAVE_STRDUP
  54. extern char *_mxml_strdup(const char *);
  55. # define strdup _mxml_strdup
  56. # endif /* !HAVE_STRDUP */
  57. # ifndef HAVE_STRLCAT
  58. extern size_t _mxml_strlcat(char *, const char *, size_t);
  59. # define strlcat _mxml_strlcat
  60. # endif /* !HAVE_STRLCAT */
  61. # ifndef HAVE_STRLCPY
  62. extern size_t _mxml_strlcpy(char *, const char *, size_t);
  63. # define strlcpy _mxml_strlcpy
  64. # endif /* !HAVE_STRLCPY */
  65. extern char *_mxml_strdupf(const char *, ...);
  66. extern char *_mxml_vstrdupf(const char *, va_list);
  67. # ifndef HAVE_SNPRINTF
  68. extern int _mxml_snprintf(char *, size_t, const char *, ...);
  69. # define snprintf _mxml_snprintf
  70. # endif /* !HAVE_SNPRINTF */
  71. # ifndef HAVE_VSNPRINTF
  72. extern int _mxml_vsnprintf(char *, size_t, const char *, va_list);
  73. # define vsnprintf _mxml_vsnprintf
  74. # endif /* !HAVE_VSNPRINTF */