8329546: Assume sized integral types are available
Reviewed-by: iklam, jwaters
This commit is contained in:
parent
f3db2796b8
commit
d90e5b5b9f
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -32,9 +32,11 @@
|
|||||||
// declarations and a few frequently used utility functions.
|
// declarations and a few frequently used utility functions.
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
@ -49,7 +51,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(LINUX) || defined(_ALLBSD_SOURCE)
|
#if defined(LINUX) || defined(_ALLBSD_SOURCE)
|
||||||
#include <inttypes.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#ifndef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
#include <ucontext.h>
|
#include <ucontext.h>
|
||||||
@ -79,28 +80,6 @@
|
|||||||
#define NULL_WORD NULL
|
#define NULL_WORD NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LINUX) && !defined(_ALLBSD_SOURCE)
|
|
||||||
// Compiler-specific primitive types
|
|
||||||
typedef unsigned short uint16_t;
|
|
||||||
#ifndef _UINT32_T
|
|
||||||
#define _UINT32_T
|
|
||||||
typedef unsigned int uint32_t;
|
|
||||||
#endif // _UINT32_T
|
|
||||||
|
|
||||||
#if !defined(_SYS_INT_TYPES_H)
|
|
||||||
#ifndef _UINT64_T
|
|
||||||
#define _UINT64_T
|
|
||||||
typedef unsigned long long uint64_t;
|
|
||||||
#endif // _UINT64_T
|
|
||||||
// %%%% how to access definition of intptr_t portably in 5.5 onward?
|
|
||||||
typedef int intptr_t;
|
|
||||||
typedef unsigned int uintptr_t;
|
|
||||||
// If this gets an error, figure out a symbol XXX that implies the
|
|
||||||
// prior definition of intptr_t, and add "&& !defined(XXX)" above.
|
|
||||||
#endif // _SYS_INT_TYPES_H
|
|
||||||
|
|
||||||
#endif // !LINUX && !_ALLBSD_SOURCE
|
|
||||||
|
|
||||||
// checking for nanness
|
// checking for nanness
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
inline int g_isnan(double f) { return isnan(f); }
|
inline int g_isnan(double f) { return isnan(f); }
|
||||||
|
Loading…
Reference in New Issue
Block a user