Changeset c5e81a2 in rtems-libbsd


Ignore:
Timestamp:
Jul 20, 2021, 9:02:50 PM (2 months ago)
Author:
Joel Sherrill <joel@…>
Branches:
6-freebsd-12
Children:
3f1e128
Parents:
c413180
git-author:
Joel Sherrill <joel@…> (07/20/21 21:02:50)
git-committer:
Joel Sherrill <joel@…> (07/21/21 22:00:22)
Message:

linker_set.h: Add alignof implementation for when not C11 or C++11

The default implementation was completely broken. Use the GCC specific
alignof if compiling for C99 or C++03. If not C++11, C11, or
GCC, then it is an error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/sys/linker_set.h

    rc413180 rc5e81a2  
    7474#elif __STDC_VERSION__ >= 201112L
    7575  #define RTEMS_BSD_ALIGNOF( _type_name ) _Alignof( _type_name )
     76#elif defined(__GNUC__)
     77  #define RTEMS_BSD_ALIGNOF( _type_name ) __alignof__( _type_name )
    7678#else
    77   #define RTEMS_BSD_ALIGNOF( _type_name ) sizeof( _type_name )
     79  #error "FIX ME! Implement RTEMS_BSD_ALIGNOF() for this environment"
    7880#endif
    7981
Note: See TracChangeset for help on using the changeset viewer.