acadia-newlib/newlib/libc/include/sys
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
..
_default_fcntl.h Align *utime*() with POSIX/glibc 2021-01-26 17:27:35 +01:00
_intsup.h Support calculation of pointer size for __int20__ type in _intsup.h 2019-06-25 13:37:16 -04:00
_locale.h Rename <xlocale.h> back to <sys/_locale.h> 2019-06-14 10:02:08 +02:00
_pthreadtypes.h Fix guard for siginfo_t and pthread_t definition 2017-06-19 13:00:05 +02:00
_sigset.h FreeBSD compatibility for <sys/select.h> 2015-12-14 15:39:44 +01:00
_stdint.h Provide __intmax_t and __uintmax_t 2016-10-25 16:24:05 +02:00
_timespec.h Synchronize <sys/_timespec.h> with FreeBSD 2019-11-04 07:03:15 +01:00
_timeval.h Move timeval macros to <sys/time.h> 2019-11-04 07:03:15 +01:00
_types.h Fix <sys/_types.h> issues with <stddef.h> 2019-06-03 10:20:15 +02:00
_tz_structs.h libc/time: Move internal newlib tz-structs into own header 2020-10-15 16:59:51 +02:00
cdefs.h amd64: prevent KCSan false positives on LAPIC mapping 2020-10-26 14:18:46 +01:00
config.h Fix warnings when building for msp430-elf 2020-09-03 12:55:32 +02:00
custom_file.h 2007-02-01 Joel Schopp <jschopp@austin.ibm.com> 2007-02-01 16:33:05 +00:00
dir.h * libc/include/sys/dir.h: New BSD-compatibility header. 2010-08-11 18:14:54 +00:00
dirent.h 2005-10-04 James E Wilson <wilson@specifix.com> 2005-10-04 20:47:39 +00:00
errno.h ansification: remove _PARAMS 2018-01-17 11:47:13 -06:00
fcntl.h 2007-11-15 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 18:49:17 +00:00
features.h newlib/libc/include/sys/features.h: update __STDC_ISO_10646__ 2019-11-26 18:34:39 +01:00
fenv.h Add default implementation of fenv.h and all methods 2019-08-09 17:49:16 +02:00
file.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
iconvnls.h ansification: remove _EXFUN, _EXFUN_NOTHROW 2018-01-17 11:47:29 -06:00
lock.h ansification: remove _CAST_VOID 2018-01-17 11:47:17 -06:00
param.h Move fd_stuff from sys/types.h to sys/select.h 2015-12-07 16:28:22 +01:00
queue.h This commit brings in a new refactored TCP stack called Rack. 2018-08-24 15:00:04 +02:00
reent.h Allow verifying _REENT_CHECK macros memory allocation 2019-10-07 15:36:03 -04:00
resource.h ansification: remove _EXFUN, _EXFUN_NOTHROW 2018-01-17 11:47:29 -06:00
sched.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
select.h select.h: update FD macros to latest FreeBSD, fix type conversion warning 2020-08-03 12:41:45 +02:00
signal.h Drop non-reserved parameter names from sys/signal.h 2018-08-29 17:46:27 +02:00
stat.h Complete revert of 2019-08-19, st_atime in libc/include/sys/stat.h 2021-02-16 13:57:11 +01:00
stdio.h ansification: remove _CAST_VOID 2018-01-17 11:47:17 -06:00
string.h 2005-01-24 Jeff Johnston <jjohnstn@redhat.com> 2005-01-24 18:46:09 +00:00
syslimits.h Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
time.h Align *utime*() with POSIX/glibc 2021-01-26 17:27:35 +01:00
timeb.h ansification: remove _PARAMS 2018-01-17 11:47:13 -06:00
times.h ansification: remove _EXFUN, _EXFUN_NOTHROW 2018-01-17 11:47:29 -06:00
timespec.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
tree.h Define RB_SET_PARENT to do all assignments 2020-10-26 14:18:46 +01:00
types.h Fix <sys/_types.h> issues with <stddef.h> 2019-06-03 10:20:15 +02:00
unistd.h Enabled _CS* defines for RTEMS 2020-08-25 20:54:33 +02:00
utime.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
wait.h Fix comment in sys/wait.h 2015-05-28 16:40:43 +02:00