acadia-newlib/newlib/libc
Hans-Peter Nilsson 571e730678 Complete revert of 2019-08-19, st_atime in libc/include/sys/stat.h
The revert-part of the revert-and-fix commit, b99887c428 a.k.a.
"Revert previous change to sys/stat.h and fix cris libgloss",
apparently intending to revert f75aa67851 a.k.a. "Fix regression in
cris-elf caused by sys/stat.h change" and fix it in another way,
wasn't complete.  Although the fix-part added the prerequisite "#undef
st_atime" (et al) to gensyscalls, the revert-part didn't revert the
"&& !defined(__cris__)" in sys/stat.h, stopping st_atime (et al) from
being defined.

The effect of the unreverted change is that accessing the struct stat
compatibility member names "st_atime" (et al) as in "struct stat
mystat; mystat.st_atime;" yields errors, observable for example when
building libgfortran in gcc:

/x/gcc/libgfortran/intrinsics/stat.c:114:42: error: 'struct stat' has \
no member named 'st_atime'; did you mean 'st_atim'?
  114 |       sarray->base_addr[8 * stride] = sb.st_atime;
      |                                          ^~~~~~~~
      |                                          st_atim
(etc.)

Trivially fixed by completing the reversion, removing the "&&
!defined(__cris__)" in sys/stat.h.

Beware: the net effect of the earlier related change to struct stat in
sys/stat.h, leading up to the fix, *does* change its definition as a
type.  Thankfully, replacing members like "time_t st_atime; long
st_spare1;" by "struct timespec st_atim;", ditto st_mtim and st_ctim,
is layout-compatible.  To wit, that change is "binary compatible".

Incidentally, related to the simulator / Linux ABI, there's a
transitional stage (see gensyscalls), reloading between "struct stat"
(sys/stat.h) and "struct new_stat" (kernel/simulator) as necessary.

Tested by a cris-elf gcc build (including libgfortran).
2021-02-16 13:57:11 +01:00
..
argz ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
ctype Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
errno makedoc: make errors visible 2017-12-07 11:54:11 +00:00
iconv libc/iconv: find_alias was mis-computing remaining alias table length 2020-07-10 10:51:43 +02:00
include Complete revert of 2019-08-19, st_atime in libc/include/sys/stat.h 2021-02-16 13:57:11 +01:00
locale drop ambiguous-wide behaviour from Unicode CJK locales 2020-10-13 13:52:07 +02:00
machine Removed Soft float from MIPS 2021-02-05 10:32:16 +01:00
misc Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
posix FTW Port for Newlib 2021-02-09 11:07:59 +01:00
reent ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
search Fix warnings when building for msp430-elf 2020-09-03 12:55:32 +02:00
signal Fix newlib functions perror()/psignal() not to use writev(). 2018-07-05 15:33:49 -04:00
ssp AMD GCN Port contributed by Andrew Stubbs <ams@codesourcery.com> 2019-01-15 10:48:08 -05:00
stdio Fix warnings when building for msp430-elf 2020-09-03 12:55:32 +02:00
stdio64 Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
stdlib malloc/nano-malloc: correctly check for out-of-bounds allocation reqs 2020-11-17 10:52:34 +01:00
string Locale modifier "@cjksingle" to enforce single-width CJK width. 2020-02-18 11:35:42 +01:00
sys RTEMS: Add <poll.h> and <sys/poll.h> 2021-01-05 13:41:34 -05:00
syscalls ansification: remove _HAVE_STDC 2018-01-17 11:47:30 -06:00
time Fix 32-bit integer overflow when calculating TZ rules 2020-11-04 13:33:36 -05:00
unix Fix comparison between two character arrays 2018-07-30 09:36:49 +02:00
xdr xdr_private.h needs sys/types.h for u_char 2018-09-06 14:10:42 +02:00
Makefile.am ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
Makefile.in ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
aclocal.m4 Fix up errors in regenerated files for 2.3.0 release. 2016-01-04 12:57:31 -05:00
configure Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
configure.in ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
libc.in.xml ssp: add documentation 2017-11-29 11:25:45 -06:00
libc.texinfo ssp: add documentation 2017-11-29 11:25:45 -06:00
saber Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
sys.tex Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64. 2015-08-03 09:54:33 +01:00