Commit Graph

11 Commits

Author SHA1 Message Date
Sebastian Huber da418955f5 Move common <sys/dirent.h> content to <dirent.h>
Move common content of the various <sys/dirent.h> and the latest FreeBSD
<dirent.h> to <dirent.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-10-11 08:29:16 +02:00
Yaakov Selkowitz 70ee6b17df ansification: remove _EXFUN, _EXFUN_NOTHROW
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:29 -06:00
Yaakov Selkowitz eea249da3b ansification: remove _PARAMS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:13 -06:00
Sebastian Huber 5d0c2b87c8 Add BSD guard for time_t
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-04-15 14:51:39 +02:00
Sebastian Huber 477463a201 Eliminate use of Newlib-specific <machine/types.h>
This change solves a glibc/BSD compatibility problem.

glibc and BSD use double underscore types for internal types.  The Linux
port of Newlib uses some glibc provided internal type definitions which
are not protected by guard defines, e.g. __off_t.  To avoid a conflict
Newlib uses single underscore types for some internal types, e.g.
_off_t.  However, for BSD compatibility we have to define the internal
types with double underscore names in <sys/_types.h>.

The header file <machine/types.h> is Newlib-specific.  It was used
instead of <sys/_types.h> to provide the internal type definitions
_CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t.  Move
these definitions to <sys/_types.h> (there exist two instances of this
file, one for Linux and one for all other targets).  This makes the
_HAVE_SYSTYPES configuration define obsolete (could possibly break the
__RDOS__ target).  Use the standard <sys/_types.h> include throughout.

Move __loff_t defintion to default (non-Linux) <sys/_types.h>.  Define
it via _off64_t to avoid a dependency on the compiler.

Provide the __off_t definition via default (non-Linux) <sys/_types.h>
based on _off_t for all systems except Cygwin.  For Cygwin use _off64_t.
Define off_t via __off_t.

Provide the __pid_t definition via default (non-Linux) <sys/_types.h>.
This prevents a potential __pid_t and pid_t incompatibility.  Add BSD
guard defines for pid_t.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-04-13 13:30:27 +02:00
Yaakov Selkowitz 97d1536d17 sparc64: move struct timeval to <sys/_timeval.h>
commit bb01594897 moved the struct timeval
declaration from <sys/time.h> to <sys/_timeval.h>, and commit
01885f533d changed <sys/select.h> to include
<sys/_timeval.h>.  Therefore, sparc64's own struct timeval needs to be
moved accordingly in order to avoid a conflict from the generic type.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Acked-by: Corinna Vinschen <vinschen@redhat.com>
2016-03-18 15:29:13 -05:00
Yaakov Selkowitz f049607eb0 Feature test macros overhaul: sparc64
sparc64 has a number of its own headers which override the generic ones.
These too need to use feature test macros properly.

These changes correspond to the generic fcntl.h and sys/stat.h changes
in commit d2df6d381b and
commit 069e400c91.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Acked-by: Corinna Vinschen <vinschen@redhat.com>
2016-03-18 15:29:05 -05:00
Yaakov Selkowitz 128e9e0be5 * libc/sys/sparc64/sys/time.h: #include <sys/types.h> for time_t. 2015-01-22 17:34:47 +00:00
Joel Sherrill a7c3258311 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/posix/readdir_r.c: Add restrict keyword.
	* libc/machine/spu/sys/dirent.h, libc/sys/decstation/sys/dirent.h,
	libc/sys/linux/sys/dirent.h, libc/sys/rtems/sys/dirent.h,
	libc/sys/sparc64/sys/dirent.h, libc/sys/sun4/sys/dirent.h,
	libc/sys/sysvi386/sys/dirent.h: Add readdir_r() prototype.
2013-11-21 16:44:39 +00:00
Joel Sherrill 32e2cbeeab 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/include/sys/stat.h, libc/sys/linux/sys/stat.h,
	libc/sys/m88kbug/syscalls.c, libc/sys/rdos/stat.c,
	libc/sys/sparc64/sys/stat.h: Add restrict keyword.
2013-11-21 16:35:47 +00:00
Christopher Faylor 8a0efa53e4 import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00