mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>
* libcsupport/include/rtems/_inttypes.h: Remove. * libcsupport/include/rtems/_stdint.h: Remove. * libcsupport/include/sys/_inttypes.h: New. * libcsupport/include/sys/_stdint.h: New. * libcsupport/Makefile.am: Reflect changes above.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* libcsupport/include/rtems/_inttypes.h: Remove.
|
||||
* libcsupport/include/rtems/_stdint.h: Remove.
|
||||
* libcsupport/include/sys/_inttypes.h: New.
|
||||
* libcsupport/include/sys/_stdint.h: New.
|
||||
* libcsupport/Makefile.am: Reflect changes above.
|
||||
|
||||
2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Remove RTEMS_CPUOPT([RTEMS_MULTILIBS],..).
|
||||
|
||||
@@ -22,13 +22,21 @@ include_rtems_HEADERS = include/chain.h include/console.h include/clockdrv.h \
|
||||
|
||||
include_HEADERS =
|
||||
|
||||
if NEWLIB
|
||||
#if NEWLIB
|
||||
include_sysdir = $(includedir)/sys
|
||||
include_sys_HEADERS =
|
||||
|
||||
if RTEMS_PROVIDES_STDINT_H
|
||||
include_HEADERS += include/stdint.h
|
||||
include_HEADERS += include/inttypes.h
|
||||
include_rtems_HEADERS += include/rtems/_stdint.h
|
||||
include_rtems_HEADERS += include/rtems/_inttypes.h
|
||||
include_sys_HEADERS += include/sys/_stdint.h
|
||||
endif
|
||||
|
||||
if RTEMS_PROVIDES_INTTYPES_H
|
||||
include_HEADERS += include/inttypes.h
|
||||
include_sys_HEADERS += include/sys/_inttypes.h
|
||||
endif
|
||||
#endif
|
||||
|
||||
## motorola
|
||||
|
||||
include_rtems_motoroladir = $(includedir)/rtems/motorola
|
||||
@@ -44,8 +52,7 @@ include_rtems_HEADERS += include/rtems/assoc.h include/rtems/error.h \
|
||||
## sys
|
||||
|
||||
if NEWLIB
|
||||
include_sysdir = $(includedir)/sys
|
||||
include_sys_HEADERS = include/sys/ioccom.h include/sys/filio.h \
|
||||
include_sys_HEADERS += include/sys/ioccom.h include/sys/filio.h \
|
||||
include/sys/ioctl.h include/sys/sockio.h include/sys/ttycom.h \
|
||||
include/sys/termios.h include/sys/utsname.h include/sys/cdefs.h
|
||||
endif
|
||||
@@ -122,6 +129,48 @@ EXTRA_DIST = src/TODO src/CASES src/README
|
||||
|
||||
DISTCLEANFILES =
|
||||
|
||||
libcsupport/include/sys/$(dirstamp):
|
||||
@$(mkdir_p) libcsupport/include/sys
|
||||
@: > libcsupport/include/sys/$(dirstamp)
|
||||
|
||||
if RTEMS_PROVIDES_STDINT_H
|
||||
|
||||
libcsupport/include/sys/_stdint.h: include/sys/_stdint.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/_stdint.h
|
||||
endif
|
||||
|
||||
if RTEMS_PROVIDES_INTTYPES_H
|
||||
|
||||
libcsupport/include/sys/_inttypes.h: include/sys/_inttypes.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/_inttypes.h
|
||||
endif
|
||||
|
||||
if NEWLIB
|
||||
libcsupport/include/sys/ioccom.h: include/sys/ioccom.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/ioccom.h
|
||||
|
||||
libcsupport/include/sys/filio.h: include/sys/filio.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/filio.h
|
||||
|
||||
libcsupport/include/sys/ioctl.h: include/sys/ioctl.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/ioctl.h
|
||||
|
||||
libcsupport/include/sys/sockio.h: include/sys/sockio.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/sockio.h
|
||||
|
||||
libcsupport/include/sys/ttycom.h: include/sys/ttycom.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/ttycom.h
|
||||
|
||||
libcsupport/include/sys/termios.h: include/sys/termios.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/termios.h
|
||||
|
||||
libcsupport/include/sys/utsname.h: include/sys/utsname.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/utsname.h
|
||||
|
||||
libcsupport/include/sys/cdefs.h: include/sys/cdefs.h libcsupport/include/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< libcsupport/include/sys/cdefs.h
|
||||
endif
|
||||
|
||||
PREINSTALL_DIRS =
|
||||
PREINSTALL_FILES =
|
||||
|
||||
@@ -171,22 +220,29 @@ $(PROJECT_INCLUDE)/rtems/vmeintr.h: include/vmeintr.h $(PROJECT_INCLUDE)/rtems/$
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/vmeintr.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vmeintr.h
|
||||
|
||||
if NEWLIB
|
||||
$(PROJECT_INCLUDE)/sys/$(dirstamp):
|
||||
@$(mkdir_p) $(PROJECT_INCLUDE)/sys
|
||||
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
|
||||
if RTEMS_PROVIDES_STDINT_H
|
||||
$(PROJECT_INCLUDE)/stdint.h: include/stdint.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/stdint.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/stdint.h
|
||||
|
||||
$(PROJECT_INCLUDE)/sys/_stdint.h: include/sys/_stdint.h $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sys/_stdint.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys/_stdint.h
|
||||
endif
|
||||
|
||||
if RTEMS_PROVIDES_INTTYPES_H
|
||||
$(PROJECT_INCLUDE)/inttypes.h: include/inttypes.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/inttypes.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/inttypes.h
|
||||
|
||||
$(PROJECT_INCLUDE)/rtems/_stdint.h: include/rtems/_stdint.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/_stdint.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/_stdint.h
|
||||
|
||||
$(PROJECT_INCLUDE)/rtems/_inttypes.h: include/rtems/_inttypes.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/_inttypes.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/_inttypes.h
|
||||
$(PROJECT_INCLUDE)/sys/_inttypes.h: include/sys/_inttypes.h $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sys/_inttypes.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys/_inttypes.h
|
||||
endif
|
||||
|
||||
$(PROJECT_INCLUDE)/rtems/motorola/$(dirstamp):
|
||||
@@ -231,11 +287,6 @@ $(PROJECT_INCLUDE)/rtems/cdefs.h: include/rtems/cdefs.h $(PROJECT_INCLUDE)/rtems
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/cdefs.h
|
||||
|
||||
if NEWLIB
|
||||
$(PROJECT_INCLUDE)/sys/$(dirstamp):
|
||||
@$(mkdir_p) $(PROJECT_INCLUDE)/sys
|
||||
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/sys/ioccom.h: include/sys/ioccom.h $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sys/ioccom.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys/ioccom.h
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 2004.
|
||||
* Ralf Corsepius, Ulm/Germany.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __rtems__inttypes_h
|
||||
#define __rtems__inttypes_h
|
||||
|
||||
#include <rtems/_stdint.h>
|
||||
|
||||
#define __STRINGIFY(a) #a
|
||||
|
||||
/* 8-bit types */
|
||||
#define __PRI8(x) __STRINGIFY(x)
|
||||
|
||||
#define PRId8 __PRI8(d)
|
||||
#define PRIi8 __PRI8(i)
|
||||
#define PRIo8 __PRI8(o)
|
||||
#define PRIu8 __PRI8(u)
|
||||
#define PRIx8 __PRI8(x)
|
||||
#define PRIX8 __PRI8(X)
|
||||
|
||||
#undef __PRI8
|
||||
|
||||
/* 16-bit types */
|
||||
#define __PRI16(x) __STRINGIFY(x)
|
||||
|
||||
#define PRId16 __PRI16(d)
|
||||
#define PRIi16 __PRI16(i)
|
||||
#define PRIo16 __PRI16(o)
|
||||
#define PRIu16 __PRI16(u)
|
||||
#define PRIx16 __PRI16(x)
|
||||
#define PRIX16 __PRI16(X)
|
||||
|
||||
#undef __PRI16
|
||||
|
||||
/* 32-bit types */
|
||||
#if defined(__rtems_long32)
|
||||
#define __PRI32(x) __STRINGIFY(l##x)
|
||||
#else
|
||||
#define __PRI32(x) __STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
#define PRId32 __PRI32(d)
|
||||
#define PRIi32 __PRI32(i)
|
||||
#define PRIo32 __PRI32(o)
|
||||
#define PRIu32 __PRI32(u)
|
||||
#define PRIx32 __PRI32(x)
|
||||
#define PRIX32 __PRI32(X)
|
||||
|
||||
#undef __PRI32
|
||||
|
||||
/* 64-bit types */
|
||||
#if defined(__rtems_longlong64)
|
||||
#define __PRI64(x) __STRINGIFY(ll##x)
|
||||
#elif defined(__rtems_longlong64)
|
||||
#define __PRI64(x) __STRINGIFY(l##x)
|
||||
#else
|
||||
#define __PRI64(x) __STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
#define PRId64 __PRI64(d)
|
||||
#define PRIi64 __PRI64(i)
|
||||
#define PRIo64 __PRI64(o)
|
||||
#define PRIu64 __PRI64(u)
|
||||
#define PRIx64 __PRI64(x)
|
||||
#define PRIX64 __PRI64(X)
|
||||
|
||||
#undef __STRINGIFY
|
||||
#undef __PRI64
|
||||
|
||||
#endif /* __rtems__inttypes_h */
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 2004.
|
||||
* Ralf Corsepius, Ulm/Germany.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __rtems__stdint_h
|
||||
#define __rtems__stdint_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 3 ) \
|
||||
&& defined(__GNUC_MINOR__) && (__GNUC_MINOR__ > 2 )
|
||||
#define __EXP(x) __##x##__
|
||||
#else
|
||||
#define __EXP(x) x
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#if __EXP(SCHAR_MAX) == 0x7f
|
||||
typedef signed char __rtems_int8_t ;
|
||||
typedef unsigned char __rtems_uint8_t ;
|
||||
#define __rtems_int8_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __EXP(INT_MAX) == 0x7fff
|
||||
typedef signed int __rtems_int16_t;
|
||||
typedef unsigned int __rtems_uint16_t;
|
||||
#define __rtems_int16_t_defined 1
|
||||
#elif __EXP(SHRT_MAX) == 0x7fff
|
||||
typedef signed short __rtems_int16_t;
|
||||
typedef unsigned short __rtems_uint16_t;
|
||||
#define __rtems_int16_t_defined 1
|
||||
#elif __EXP(SCHAR_MAX) == 0x7fff
|
||||
typedef signed char __rtems_int32_t;
|
||||
typedef unsigned char __rtems_uint32_t;
|
||||
#define __rtems_int16_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __EXP(INT_MAX) == 0x7fffffff
|
||||
typedef signed int __rtems_int32_t;
|
||||
typedef unsigned int __rtems_uint32_t;
|
||||
#define __rtems_int32_t_defined 1
|
||||
#elif __EXP(LONG_MAX) == 0x7fffffff
|
||||
typedef signed long __rtems_int32_t;
|
||||
typedef unsigned long __rtems_uint32_t;
|
||||
#define __rtems_int32_t_defined 1
|
||||
#define __rtems_long32 1
|
||||
#elif __EXP(SHRT_MAX) == 0x7fffffff
|
||||
typedef signed short __rtems_int32_t;
|
||||
typedef unsigned short __rtems_uint32_t;
|
||||
#define __rtems_int32_t_defined 1
|
||||
#elif __EXP(SCHAR_MAX) == 0x7fffffff
|
||||
typedef signed char __rtems_int32_t;
|
||||
typedef unsigned char __rtems_uint32_t;
|
||||
#define __rtems_int32_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __EXP(LONG_MAX) == 0x7fffffffffffffff
|
||||
typedef signed long int __rtems_int64_t;
|
||||
typedef unsigned long int __rtems_uint64_t;
|
||||
#define __rtems_int64_t_defined 1
|
||||
#define __rtems_long64 1
|
||||
#elif __EXP(LONG_LONG_MAX) == 0x7fffffffffffffff
|
||||
typedef signed long int __rtems_int64_t;
|
||||
typedef unsigned long int __rtems_uint64_t;
|
||||
#define __rtems_int64_t_defined 1
|
||||
#define __rtems_longlong64 1
|
||||
#elif __EXP(INT_MAX) == 0x7fffffffffffffff
|
||||
typedef signed int __rtems_int64_t;
|
||||
typedef unsigned int __rtems_uint64_t;
|
||||
#define __rtems_int64_t_defined 1
|
||||
#endif
|
||||
|
||||
#undef __EXP
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __rtems__stdint_h */
|
||||
177
cpukit/libcsupport/include/sys/_inttypes.h
Normal file
177
cpukit/libcsupport/include/sys/_inttypes.h
Normal file
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 2004.
|
||||
* Ralf Corsepius, Ulm/Germany.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __rtems_inttypes_h
|
||||
#define __rtems_inttypes_h
|
||||
|
||||
#include <sys/_stdint.h>
|
||||
|
||||
#define __STRINGIFY(a) #a
|
||||
|
||||
/* 8-bit types */
|
||||
#define __PRI8(x) __STRINGIFY(x)
|
||||
|
||||
#define PRId8 __PRI8(d)
|
||||
#define PRIi8 __PRI8(i)
|
||||
#define PRIo8 __PRI8(o)
|
||||
#define PRIu8 __PRI8(u)
|
||||
#define PRIx8 __PRI8(x)
|
||||
#define PRIX8 __PRI8(X)
|
||||
|
||||
#define PRIdLEAST8 __PRI8(d)
|
||||
#define PRIiLEAST8 __PRI8(i)
|
||||
#define PRIoLEAST8 __PRI8(o)
|
||||
#define PRIuLEAST8 __PRI8(u)
|
||||
#define PRIxLEAST8 __PRI8(x)
|
||||
#define PRIXLEAST8 __PRI8(X)
|
||||
|
||||
#define PRIdFAST8 __PRI8(d)
|
||||
#define PRIiFAST8 __PRI8(i)
|
||||
#define PRIoFAST8 __PRI8(o)
|
||||
#define PRIuFAST8 __PRI8(u)
|
||||
#define PRIxFAST8 __PRI8(x)
|
||||
#define PRIXFAST8 __PRI8(X)
|
||||
|
||||
/* 16-bit types */
|
||||
#define __PRI16(x) __STRINGIFY(x)
|
||||
|
||||
#define PRId16 __PRI16(d)
|
||||
#define PRIi16 __PRI16(i)
|
||||
#define PRIo16 __PRI16(o)
|
||||
#define PRIu16 __PRI16(u)
|
||||
#define PRIx16 __PRI16(x)
|
||||
#define PRIX16 __PRI16(X)
|
||||
|
||||
#define PRIdLEAST16 __PRI16(d)
|
||||
#define PRIiLEAST16 __PRI16(i)
|
||||
#define PRIoLEAST16 __PRI16(o)
|
||||
#define PRIuLEAST16 __PRI16(u)
|
||||
#define PRIxLEAST16 __PRI16(x)
|
||||
#define PRIXLEAST16 __PRI16(X)
|
||||
|
||||
#define PRIdFAST16 __PRI16(d)
|
||||
#define PRIiFAST16 __PRI16(i)
|
||||
#define PRIoFAST16 __PRI16(o)
|
||||
#define PRIuFAST16 __PRI16(u)
|
||||
#define PRIxFAST16 __PRI16(x)
|
||||
#define PRIXFAST16 __PRI16(X)
|
||||
|
||||
/* 32-bit types */
|
||||
#if defined(__rtems_long32)
|
||||
#define __PRI32(x) __STRINGIFY(l##x)
|
||||
#else
|
||||
#define __PRI32(x) __STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
#define PRId32 __PRI32(d)
|
||||
#define PRIi32 __PRI32(i)
|
||||
#define PRIo32 __PRI32(o)
|
||||
#define PRIu32 __PRI32(u)
|
||||
#define PRIx32 __PRI32(x)
|
||||
#define PRIX32 __PRI32(X)
|
||||
|
||||
#define PRIdLEAST32 __PRI32(d)
|
||||
#define PRIiLEAST32 __PRI32(i)
|
||||
#define PRIoLEAST32 __PRI32(o)
|
||||
#define PRIuLEAST32 __PRI32(u)
|
||||
#define PRIxLEAST32 __PRI32(x)
|
||||
#define PRIXLEAST32 __PRI32(X)
|
||||
|
||||
#define PRIdFAST32 __PRI32(d)
|
||||
#define PRIiFAST32 __PRI32(i)
|
||||
#define PRIoFAST32 __PRI32(o)
|
||||
#define PRIuFAST32 __PRI32(u)
|
||||
#define PRIxFAST32 __PRI32(x)
|
||||
#define PRIXFAST32 __PRI32(X)
|
||||
|
||||
/* 64-bit types */
|
||||
#if defined(__rtems_longlong64)
|
||||
#define __PRI64(x) __STRINGIFY(ll##x)
|
||||
#elif defined(__rtems_long64)
|
||||
#define __PRI64(x) __STRINGIFY(l##x)
|
||||
#else
|
||||
#define __PRI64(x) __STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
#define PRId64 __PRI64(d)
|
||||
#define PRIi64 __PRI64(i)
|
||||
#define PRIo64 __PRI64(o)
|
||||
#define PRIu64 __PRI64(u)
|
||||
#define PRIx64 __PRI64(x)
|
||||
#define PRIX64 __PRI64(X)
|
||||
|
||||
#define PRIdLEAST64 __PRI64(d)
|
||||
#define PRIiLEAST64 __PRI64(i)
|
||||
#define PRIoLEAST64 __PRI64(o)
|
||||
#define PRIuLEAST64 __PRI64(u)
|
||||
#define PRIxLEAST64 __PRI64(x)
|
||||
#define PRIXLEAST64 __PRI64(X)
|
||||
|
||||
#define PRIdFAST64 __PRI64(d)
|
||||
#define PRIiFAST64 __PRI64(i)
|
||||
#define PRIoFAST64 __PRI64(o)
|
||||
#define PRIuFAST64 __PRI64(u)
|
||||
#define PRIxFAST64 __PRI64(x)
|
||||
#define PRIXFAST64 __PRI64(X)
|
||||
|
||||
/* max-bit types */
|
||||
#if defined(__rtems_longlong64)
|
||||
#define __PRIMAX(x) __STRINGIFY(ll##x)
|
||||
#elif defined(__rtems_long64)
|
||||
#define __PRIMAX(x) __STRINGIFY(l##x)
|
||||
#else
|
||||
#define __PRIMAX(x) __STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
#define PRIdMAX __PRIMAX(d)
|
||||
#define PRIiMAX __PRIMAX(i)
|
||||
#define PRIoMAX __PRIMAX(o)
|
||||
#define PRIuMAX __PRIMAX(u)
|
||||
#define PRIxMAX __PRIMAX(x)
|
||||
#define PRIXMAX __PRIMAX(X)
|
||||
|
||||
/* ptr types */
|
||||
#if defined(__rtems_longlong64)
|
||||
#define __PRIPTR(x) __STRINGIFY(ll##x)
|
||||
#elif defined(__rtems_long64)
|
||||
#define __PRIPTR(x) __STRINGIFY(l##x)
|
||||
#else
|
||||
#define __PRIPTR(x) __STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
#define PRIdPTR __PRIPTR(d)
|
||||
#define PRIiPTR __PRIPTR(i)
|
||||
#define PRIoPTR __PRIPTR(o)
|
||||
#define PRIuPTR __PRIPTR(u)
|
||||
#define PRIxPTR __PRIPTR(x)
|
||||
#define PRIXPTR __PRIPTR(X)
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern intmax_t imaxabs(intmax_t j);
|
||||
extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denomer);
|
||||
extern intmax_t strtoimax(const char *__restrict, char **__restrict, int);
|
||||
extern uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
|
||||
extern intmax_t wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
|
||||
extern uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __rtems_inttypes_h */
|
||||
103
cpukit/libcsupport/include/sys/_stdint.h
Normal file
103
cpukit/libcsupport/include/sys/_stdint.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 2004.
|
||||
* Ralf Corsepius, Ulm/Germany.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __sys_stdint_h
|
||||
#define __sys_stdint_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 3 ) \
|
||||
&& defined(__GNUC_MINOR__) && (__GNUC_MINOR__ > 2 )
|
||||
#define __EXP(x) __##x##__
|
||||
#else
|
||||
#define __EXP(x) x
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#if __EXP(SCHAR_MAX) == 0x7f
|
||||
typedef signed char int8_t ;
|
||||
typedef unsigned char uint8_t ;
|
||||
#define int8_t_defined 1
|
||||
|
||||
typedef signed char int_least8_t;
|
||||
typedef unsigned char uint_least8_t;
|
||||
#define int_least8_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __EXP(INT_MAX) == 0x7fff
|
||||
typedef signed int int16_t;
|
||||
typedef unsigned int uint16_t;
|
||||
#define int16_t_defined 1
|
||||
#elif __EXP(SHRT_MAX) == 0x7fff
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
#define int16_t_defined 1
|
||||
#elif __EXP(SCHAR_MAX) == 0x7fff
|
||||
typedef signed char int32_t;
|
||||
typedef unsigned char uint32_t;
|
||||
#define int16_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __EXP(INT_MAX) == 0x7fffffffL
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#define int32_t_defined 1
|
||||
#elif __EXP(LONG_MAX) == 0x7fffffffL
|
||||
typedef signed long int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
#define int32_t_defined 1
|
||||
#define __rtems_long32 1
|
||||
#elif __EXP(SHRT_MAX) == 0x7fffffffL
|
||||
typedef signed short int32_t;
|
||||
typedef unsigned short uint32_t;
|
||||
#define int32_t_defined 1
|
||||
#elif __EXP(SCHAR_MAX) == 0x7fffffffL
|
||||
typedef signed char int32_t;
|
||||
typedef unsigned char uint32_t;
|
||||
#define int32_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __EXP(LONG_MAX) > 0x7fffffff
|
||||
typedef signed long int64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
#define int64_t_defined 1
|
||||
#define __rtems_long64 1
|
||||
#elif __EXP(LONG_LONG_MAX) > 0x7fffffff
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#define int64_t_defined 1
|
||||
#define __rtems_longlong64 1
|
||||
#elif __EXP(INT_MAX) > 0x7fffffff
|
||||
typedef signed int int64_t;
|
||||
typedef unsigned int uint64_t;
|
||||
#define int64_t_defined 1
|
||||
#endif
|
||||
|
||||
#if __rtems_longlong64
|
||||
typedef signed long long intmax_t;
|
||||
typedef unsigned long long uintmax_t;
|
||||
#else
|
||||
typedef signed long intmax_t;
|
||||
typedef unsigned long uintmax_t;
|
||||
#endif
|
||||
|
||||
typedef signed long intptr_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
|
||||
#undef __EXP
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__sys_stdint_h */
|
||||
Reference in New Issue
Block a user