summaryrefslogtreecommitdiff
path: root/inttypes.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-04-21 20:43:14 -0400
committerJakob Kaivo <jkk@ung.org>2022-04-21 20:43:14 -0400
commitfb9a290b72cf3d3cdbafc91de2ba3249fb52d71e (patch)
tree2981f74645e6edc59144b54d9d9cd59d049d835a /inttypes.h
parent30ae061876cf13c3ddf16548ff892651437857d1 (diff)
cleanup and update
Diffstat (limited to 'inttypes.h')
-rw-r--r--inttypes.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/inttypes.h b/inttypes.h
index 7c24164..eb52fd6 100644
--- a/inttypes.h
+++ b/inttypes.h
@@ -27,10 +27,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
-#if !(defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__)
-# error <inttypes.h> requires C99 or higher
-#endif
+/* TODO: replace WORD_BIT with __LP32__, __ILP32__, __ILP64__, __LLP64__ */
+#if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__)
#include <stdint.h>
#define PRIX16 "hX"
@@ -277,8 +276,6 @@ typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
-typedef long long int intmax_t;
-typedef unsigned long long int uintmax_t;
intmax_t imaxabs(intmax_t);
imaxdiv_t imaxdiv(intmax_t, intmax_t);
@@ -286,5 +283,10 @@ intmax_t strtoimax(const char * restrict, char ** restrict, int);
uintmax_t strtoumax(const char *restrict, char ** restrict, int);
intmax_t wcstoimax(const wchar_t * restrict, wchar_t ** restrict, int);
uintmax_t wcstoumax(const wchar_t * restrict, wchar_t ** restrict, int);
+#endif
+
+#if (defined _XOPEN_SOURCE && 500 <= _XOPEN_SOURCE && _XOPEN_SOURCE < 600)
+/* TODO: {u,}int{8,16,32,64}_t, {u,}intptr_t */
+#endif
#endif