[PATCH v2 20/20] scripts/xeno-config: Allow disabling the y2038 / time64_t support
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <20260302-wip-flo-fix-time64-32bit-native-v2-20-7caefce29bcd@siemens.com> |
xeno-config got a new cmdline option --disable-y2038 that will disable the time64_t or (year 2038) support inside the application that is being build against libcobalt. libcobalt provides both interfaces, so for native time_t and for time64_t at the same time. By default, the time64_t based interfaces will be used. If an application does really want to go back to native time_t --disable-y2038 has to be specified before the --cflags option. The new parameter is only useful for (old) 32 bit applications. Signed-off-by: Florian Bezdeka <[email protected]> --- scripts/xeno-config-cobalt.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in index 46b6c11b92fe20e4474e0173a211b18dc5cd7e3b..ecbfefb8f0a9f7ea99864d07e5f717841ef5da4e 100644 --- a/scripts/xeno-config-cobalt.in +++ b/scripts/xeno-config-cobalt.in @@ -62,6 +62,7 @@ Options : --core --info --compat + --disable-y2038 EOF exit $1 } @@ -173,6 +174,9 @@ while test $# -gt 0; do --posix|--cobalt|--vxworks|--psos|--alchemy|--rtdm|--smokey) skin_list="$skin_list `expr "$1" : '--\(.*\)'`" ;; + --disable-y2038) + disable_y2038=y + ;; --cflags) do_cflags=y ;; @@ -233,6 +237,7 @@ if test x$do_cflags = xy; then ;; esac done + test x$disable_y2038 = xy && cflags="$cflags -U_TIME_BITS -U_FILE_OFFSET_BITS" echo $cflags fi -- 2.53.0