matio_pubconf.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /* src/matio_pubconf.h. Generated from matio_pubconf.h.in by configure. */
  2. /*
  3. * Copyright (c) 2015-2024, The matio contributors
  4. * Copyright (c) 2010-2014, Christopher C. Hulbert
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright notice, this
  11. * list of conditions and the following disclaimer.
  12. *
  13. * 2. Redistributions in binary form must reproduce the above copyright notice,
  14. * this list of conditions and the following disclaimer in the documentation
  15. * and/or other materials provided with the distribution.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  18. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  21. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  23. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  24. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  26. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. */
  28. #ifndef MATIO_PUBCONF_H
  29. #define MATIO_PUBCONF_H 1
  30. /* Matio major version number */
  31. #define MATIO_MAJOR_VERSION 1
  32. /* Matio minor version number */
  33. #define MATIO_MINOR_VERSION 5
  34. /* Matio release level number */
  35. #define MATIO_RELEASE_LEVEL 27
  36. /* Matio version number */
  37. #define MATIO_VERSION 1527
  38. /* Matio version string */
  39. #define MATIO_VERSION_STR "1.5.27"
  40. /* Default file format */
  41. #define MAT_FT_DEFAULT MAT_FT_MAT5
  42. /* Define to 1 if you have the <stdint.h> header file. */
  43. #define MATIO_HAVE_STDINT_H 1
  44. /* Define to 1 if you have the <inttypes.h> header file. */
  45. #define MATIO_HAVE_INTTYPES_H 1
  46. /* int16 type */
  47. #define _mat_int16_t int16_t
  48. /* int32 type */
  49. #define _mat_int32_t int32_t
  50. /* int64 type */
  51. #define _mat_int64_t int64_t
  52. /* int8 type */
  53. #define _mat_int8_t int8_t
  54. /* uint16 type */
  55. #define _mat_uint16_t uint16_t
  56. /* uint32 type */
  57. #define _mat_uint32_t uint32_t
  58. /* uint64 type */
  59. #define _mat_uint64_t uint64_t
  60. /* uint8 type */
  61. #define _mat_uint8_t uint8_t
  62. #if MATIO_HAVE_INTTYPES_H
  63. #include <inttypes.h>
  64. #endif
  65. #if MATIO_HAVE_STDINT_H
  66. #include <stdint.h>
  67. #endif
  68. #ifdef _mat_int64_t
  69. typedef _mat_int64_t mat_int64_t;
  70. #endif
  71. #ifdef _mat_uint64_t
  72. typedef _mat_uint64_t mat_uint64_t;
  73. #endif
  74. #ifdef _mat_int32_t
  75. typedef _mat_int32_t mat_int32_t;
  76. #endif
  77. #ifdef _mat_uint32_t
  78. typedef _mat_uint32_t mat_uint32_t;
  79. #endif
  80. #ifdef _mat_int16_t
  81. typedef _mat_int16_t mat_int16_t;
  82. #endif
  83. #ifdef _mat_uint16_t
  84. typedef _mat_uint16_t mat_uint16_t;
  85. #endif
  86. #ifdef _mat_int8_t
  87. typedef _mat_int8_t mat_int8_t;
  88. #endif
  89. #ifdef _mat_uint8_t
  90. typedef _mat_uint8_t mat_uint8_t;
  91. #endif
  92. /*
  93. The following macros handle noreturn attributes according to the
  94. C11/C++11 standard with fallback to GNU, Clang or MSVC extensions if using
  95. an older compiler.
  96. */
  97. #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
  98. #define MATIO_NORETURN _Noreturn
  99. #define MATIO_NORETURNATTR
  100. #elif __cplusplus >= 201103L
  101. #if (defined(__GNUC__) && __GNUC__ >= 5) || \
  102. (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 8)
  103. #define MATIO_NORETURN [[noreturn]]
  104. #define MATIO_NORETURNATTR
  105. #elif (defined(__GNUC__) && __GNUC__ >= 3) || \
  106. (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
  107. #define MATIO_NORETURN
  108. #define MATIO_NORETURNATTR __attribute__((noreturn))
  109. #elif defined(__GNUC__)
  110. #define MATIO_NORETURN
  111. #define MATIO_NORETURNATTR
  112. #else
  113. #define MATIO_NORETURN [[noreturn]]
  114. #define MATIO_NORETURNATTR
  115. #endif
  116. #elif defined(__clang__)
  117. #if __has_attribute(noreturn)
  118. #define MATIO_NORETURN
  119. #define MATIO_NORETURNATTR __attribute__((noreturn))
  120. #else
  121. #define MATIO_NORETURN
  122. #define MATIO_NORETURNATTR
  123. #endif
  124. #elif (defined(__GNUC__) && __GNUC__ >= 3) || \
  125. (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 2 && __GNUC_MINOR__ >= 8) || \
  126. (defined(__SUNPRO_C) && __SUNPRO_C >= 0x5110)
  127. #define MATIO_NORETURN
  128. #define MATIO_NORETURNATTR __attribute__((noreturn))
  129. #elif (defined(_MSC_VER) && _MSC_VER >= 1200) || defined(__BORLANDC__)
  130. #define MATIO_NORETURN __declspec(noreturn)
  131. #define MATIO_NORETURNATTR
  132. #else
  133. #define MATIO_NORETURN
  134. #define MATIO_NORETURNATTR
  135. #endif
  136. /*
  137. The following macros handle format attributes for type-checks against a
  138. format string.
  139. */
  140. #if defined(__GNUC__) && __GNUC__ >= 3
  141. #define MATIO_FORMATATTR_PRINTF1 __attribute__((format(printf, 1, 2)))
  142. #define MATIO_FORMATATTR_PRINTF2 __attribute__((format(printf, 2, 3)))
  143. #define MATIO_FORMATATTR_VPRINTF __attribute__((format(printf, 1, 0)))
  144. #elif defined(__clang__)
  145. #if __has_attribute(format)
  146. #define MATIO_FORMATATTR_PRINTF1 __attribute__((format(printf, 1, 2)))
  147. #define MATIO_FORMATATTR_PRINTF2 __attribute__((format(printf, 2, 3)))
  148. #define MATIO_FORMATATTR_VPRINTF __attribute__((format(printf, 1, 0)))
  149. #else
  150. #define MATIO_FORMATATTR_PRINTF1
  151. #define MATIO_FORMATATTR_PRINTF2
  152. #define MATIO_FORMATATTR_VPRINTF
  153. #endif
  154. #else
  155. #define MATIO_FORMATATTR_PRINTF1
  156. #define MATIO_FORMATATTR_PRINTF2
  157. #define MATIO_FORMATATTR_VPRINTF
  158. #endif
  159. #endif /* MATIO_PUBCONF_H */