Changeset a5777f0 in rtems


Ignore:
Timestamp:
Apr 13, 2004, 3:15:28 PM (18 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
28b63352
Parents:
bd00319
Message:

2004-04-13 Ralf Corsepius <ralf_corsepius@…>

  • configure.ac: Rework stdint.h/inttypes.h support. Add RTEMS_USES_STDINT_H. Add RTEMS_USES_INTTYPES_H. Remove NEED_STDINT_H. Remove NEED_INTTYPES_H. Remove termios-flag detection.
  • libcsupport/Makefile.am: Install include/stdint.h and include/inttypes.h for NEWLIB only.
  • libcsupport/include/stdint.h: Rework; Now newlib specific.
  • libcsupport/src/termios.c: Make newlib specific.
  • include/rtems/stdint.h: Rework; Now wrapper to <stdint.h>.
Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rbd00319 ra5777f0  
     12004-04-13      Ralf Corsepius <ralf_corsepius@rtems.org>
     2
     3        * configure.ac: Rework stdint.h/inttypes.h support.
     4        Add RTEMS_USES_STDINT_H. Add RTEMS_USES_INTTYPES_H.
     5        Remove NEED_STDINT_H. Remove NEED_INTTYPES_H.
     6        Remove termios-flag detection.
     7        * libcsupport/Makefile.am: Install include/stdint.h and
     8        include/inttypes.h for NEWLIB only.
     9        * libcsupport/include/stdint.h: Rework; Now newlib specific.
     10        * libcsupport/src/termios.c: Make newlib specific.
     11        * include/rtems/stdint.h: Rework; Now wrapper to <stdint.h>.
     12
    1132004-04-12      Ralf Corsepius <ralf_corsepius@rtems.org>
    214
  • cpukit/configure.ac

    rbd00319 ra5777f0  
    8989AC_CHECK_FUNCS([isascii fileno])
    9090
     91## Check if the installed toolchain has these headers
     92AC_CHECK_HEADER(stdint.h)
     93AC_CHECK_HEADER(inttypes.h)
     94
     95AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[
     96  RTEMS_USES_STDINT_H=yes
     97  RTEMS_USES_INTTYPES_H=yes],[
     98  RTEMS_USES_STDINT_H=$ac_cv_header_stdint_h
     99  RTEMS_USES_INTTYPES_H=$ac_cv_header_inttypes_h
     100])
     101
    91102AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
    92103## FIXME: This check is doubtful
     
    160171  [1],
    161172  [to indicate RTEMS using RTEMS's unixlib])
     173
     174RTEMS_CPUOPT([RTEMS_USES_STDINT_H],
     175  [test x"${RTEMS_USES_STDINT_H}" = x"yes"],
     176  [1],
     177  [if RTEMS uses stdint.h])
     178
     179RTEMS_CPUOPT([RTEMS_USES_INTTYPES_H],
     180  [test x"${RTEMS_USES_INTTYPES_H}" = x"yes"],
     181  [1],
     182  [if RTEMS uses inttypes.h])
    162183
    163184RTEMS_CPUOPT([RTEMS_VERSION],
     
    228249AC_CHECK_HEADERS([sys/queue.h],[NEED_SYS_QUEUE_H=no],[NEED_SYS_QUEUE_H=yes])
    229250
    230 AS_IF([test x"$RTEMS_USE_NEWLIB" != x"yes"],[
    231 ## Provide headers only if the host doesn't.
    232   AC_CHECK_HEADERS([stdint.h],[NEED_STDINT_H=no],[NEED_STDINT_H=yes])
    233   AC_CHECK_HEADERS([inttypes.h],[NEED_INTTYPES_H=no],[NEED_INTTYPES=yes])
    234 ],[
    235 ## Using newlib, we provide sys/cdefs.h
    236   NEED_STDINT_H=yes
    237   NEED_INTTYPES_H=yes
    238 ])
    239 
    240251# FIXME: These checks are only in here to provide
    241252# configuration-time diagnostics and are not really used.
     
    243254AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>])
    244255
    245 AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[
    246 ac_cv_have_decl_XTABS=yes
    247 ac_cv_have_decl_OLCUC=yes
    248 ## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD)
    249 ac_cv_have_decl_ONLRET=yes
    250 ac_cv_have_decl_ONOCR=yes
    251 ac_cv_have_decl_TABDLY=yes
    252 ac_cv_have_decl_OCRNL=yes
    253 ac_cv_have_decl_IUCLC=yes
    254 ## SUSV3-XSI extension
    255 ac_cv_have_decl_ECHOPRT=yes
    256 ])
    257 
    258 # FIXME: Some cruft to work around portability issues with termios.c
    259 ## Seemingly not covered by any standard.
    260 AC_CHECK_DECLS([XTABS],,,[#include <termios.h>])
    261 AC_CHECK_DECLS([OLCUC],,,[#include <termios.h>])
    262 ## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD)
    263 AC_CHECK_DECLS([ONLRET],,,[#include <termios.h>])
    264 AC_CHECK_DECLS([ONOCR],,,[#include <termios.h>])
    265 AC_CHECK_DECLS([TABDLY],,,[#include <termios.h>])
    266 AC_CHECK_DECLS([OCRNL],,,[#include <termios.h>])
    267 AC_CHECK_DECLS([IUCLC],,,[#include <termios.h>])
    268 ## SUSV3-XSI extension
    269 AC_CHECK_DECLS([ECHOPRT],,,[#include <termios.h>])
    270 
    271256## BSD-ism, excluded from POSIX, but available on most platforms
    272257AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>])
     
    298283AM_CONDITIONAL([NEED_SYS_CDEFS_H],[test x"$NEED_SYS_CDEFS_H" = x"yes"])
    299284AM_CONDITIONAL([NEED_SYS_QUEUE_H],[test x"$NEED_SYS_QUEUE_H" = x"yes"])
    300 AM_CONDITIONAL([NEED_STDINT_H],[test x"$NEED_STDINT_H" = x"yes"])
    301 AM_CONDITIONAL([NEED_INTTYPES_H],[test x"$NEED_INTTYPES_H" = x"yes"])
    302285
    303286AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
  • cpukit/include/rtems/stdint.h

    rbd00319 ra5777f0  
    1414#endif
    1515
    16 #include <rtems/score/types.h>
     16#include <rtems/score/cpuopts.h>
    1717
     18#if RTEMS_USES_STDINT_H
     19#include <stdint.h>
     20
     21#elif RTEMS_USES_INTTYPES_H
     22#include <inttypes.h>
     23
     24#else
    1825/*
    19  * map RTEMS internal types onto C99 types
     26 * Wild guesses on systems not providing stdint.h nor inttypes.h
     27 * Known to work on Cywgin-1.3
    2028 */
    21 typedef signed8        int8_t;
    22 typedef signed16       int16_t;
    23 typedef signed32       int32_t;
    24 typedef signed64       int64_t;
     29 
     30#include <sys/types.h>
    2531
    26 typedef unsigned8      uint8_t;
    27 typedef unsigned16     uint16_t;
    28 typedef unsigned32     uint32_t;
    29 typedef unsigned64     uint64_t;
     32#if !defined(uint8_t) && defined(__uint8_t)
     33typedef __uint8_t uint8_t;
     34#endif
     35
     36#if !defined(uint16_t) && defined(__uint16_t)
     37typedef __uint16_t uint16_t;
     38#endif
     39
     40#if !defined(uint32_t) && defined(__uint32_t)
     41typedef __uint32_t uint32_t;
     42#endif
     43
     44#if !defined(uint64_t) && defined(__uint64_t)
     45typedef __uint64_t uint64_t;
     46#endif
     47
     48#endif
    3049
    3150#ifdef __cplusplus
  • cpukit/libcsupport/Makefile.am

    rbd00319 ra5777f0  
    2222
    2323include_HEADERS =
    24 if NEED_STDINT_H
     24
     25if NEWLIB
    2526include_HEADERS += include/stdint.h
    26 endif
    27 if NEED_INTTYPES_H
    2827include_HEADERS += include/inttypes.h
    2928endif
     
    178177PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vmeintr.h
    179178
    180 if NEED_STDINT_H
     179if NEWLIB
    181180$(PROJECT_INCLUDE)/stdint.h: include/stdint.h $(PROJECT_INCLUDE)/$(dirstamp)
    182181        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/stdint.h
    183182PREINSTALL_FILES += $(PROJECT_INCLUDE)/stdint.h
    184 endif
    185 
    186 if NEED_INTTYPES_H
     183
    187184$(PROJECT_INCLUDE)/inttypes.h: include/inttypes.h $(PROJECT_INCLUDE)/$(dirstamp)
    188185        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/inttypes.h
  • cpukit/libcsupport/include/stdint.h

    rbd00319 ra5777f0  
    1414#endif
    1515
    16 #include <rtems/stdint.h>
     16#include <rtems/score/types.h>
     17
     18/*
     19 * map RTEMS internal types onto C99 types
     20 */
     21typedef signed8        int8_t;
     22typedef signed16       int16_t;
     23typedef signed32       int32_t;
     24typedef signed64       int64_t;
     25
     26typedef unsigned8      uint8_t;
     27typedef unsigned16     uint16_t;
     28typedef unsigned32     uint32_t;
     29typedef unsigned64     uint64_t;
    1730
    1831#ifdef __cplusplus
  • cpukit/libcsupport/src/termios.c

    rbd00319 ra5777f0  
    3131
    3232#include <rtems/termiostypes.h>
    33 
    34 /*
    35  *  FreeBSD does not support a full POSIX termios so we have to help it out
    36  */
    37 #if !HAVE_DECL_XTABS
    38 #define XTABS   0
    39 #endif
    40 
    41 #if !HAVE_DECL_ONLRET
    42 #define ONLRET  0
    43 #endif
    44 #if !HAVE_DECL_ONOCR
    45 #define ONOCR  0
    46 #endif
    47 #if !HAVE_DECL_TABDLY
    48 #define TABDLY  0
    49 #endif
    50 #if !HAVE_DECL_OLCUC
    51 #define OLCUC 0
    52 #endif
    53 #if !HAVE_DECL_ILCUC
    54 #define ILCUC 0
    55 #endif
    56 #if !HAVE_DECL_OCRNL
    57 #define OCRNL 0
    58 #endif
    59 #if !HAVE_DECL_IUCLC
    60 #define IUCLC   0
    61 #endif
    62 
    63 #if !HAVE_DECL_ECHOPRT
    64 #define ECHOPRT 0
    65 #endif
    6633
    6734/*
Note: See TracChangeset for help on using the changeset viewer.