mxml-config.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Configuration file for Mini-XML, a small XML file parsing library.
  3. *
  4. * https://www.msweet.org/mxml
  5. *
  6. * Copyright © 2003-2020 by Michael R Sweet.
  7. *
  8. * Licensed under Apache License v2.0. See the file "LICENSE" for more
  9. * information.
  10. */
  11. /*
  12. * Include necessary headers...
  13. */
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <string.h>
  17. #include <stdarg.h>
  18. #include <ctype.h>
  19. #include "ql_fs.h"
  20. /*
  21. * Version number...
  22. */
  23. #define MXML_VERSION "Mini-XML v3.2"
  24. /*
  25. * Inline function support...
  26. */
  27. #define inline
  28. #undef MXML_DEBUG
  29. /*
  30. * Long long support...
  31. */
  32. #undef HAVE_LONG_LONG
  33. /*
  34. * Do we have the *printf() functions?
  35. */
  36. /*#undef HAVE_SNPRINTF
  37. #undef HAVE_VASPRINTF
  38. #undef HAVE_VSNPRINTF*/
  39. #undef HAVE_SNPRINTF
  40. #undef HAVE_VASPRINTF
  41. #undef HAVE_VSNPRINTF
  42. /*
  43. * Do we have the strXXX() functions?
  44. */
  45. #undef HAVE_STRDUP
  46. #undef HAVE_STRLCAT
  47. #undef HAVE_STRLCPY
  48. /*
  49. * Do we have threading support?
  50. */
  51. #undef MXML_HAVE_PTHREAD_H
  52. /*
  53. * Define prototypes for string functions as needed...
  54. */
  55. # ifndef HAVE_STRDUP
  56. extern char *_mxml_strdup(const char *);
  57. # define strdup _mxml_strdup
  58. # endif /* !HAVE_STRDUP */
  59. # ifndef HAVE_STRLCAT
  60. extern size_t _mxml_strlcat(char *, const char *, size_t);
  61. # define strlcat _mxml_strlcat
  62. # endif /* !HAVE_STRLCAT */
  63. # ifndef HAVE_STRLCPY
  64. extern size_t _mxml_strlcpy(char *, const char *, size_t);
  65. # define strlcpy _mxml_strlcpy
  66. # endif /* !HAVE_STRLCPY */
  67. extern char *_mxml_strdupf(const char *, ...);
  68. extern char *_mxml_vstrdupf(const char *, va_list);
  69. # ifndef HAVE_SNPRINTF
  70. extern int _mxml_snprintf(char *, size_t, const char *, ...);
  71. # define snprintf _mxml_snprintf
  72. # endif /* !HAVE_SNPRINTF */
  73. # ifndef HAVE_VSNPRINTF
  74. extern int _mxml_vsnprintf(char *, size_t, const char *, va_list);
  75. # define vsnprintf _mxml_vsnprintf
  76. # endif /* !HAVE_VSNPRINTF */