summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys/time.h
Commit message (Collapse)AuthorAgeFilesLines
* sys/time.h: Change visibility of gettimeofday.Corinna Vinschen2016-06-201-1/+2
| | | | | | | gettimeofday is currently guarded with __MISC_VISIBLE || __XSI_VISIBLE. However, gettimeofday should be always visible, as in GLibc. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Move kernel dependent parts of <sys/time.h>cygwin-2_5_0-releaseSebastian Huber2016-04-081-149/+2
| | | | | | | | Move the kernel dependent parts of <sys/time.h> to new system-specific header file <machine/_time.h>. Provide an empty default implementation. Add a specialized implementation for RTEMS. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Feature test macros overhaul: sys/time.hYaakov Selkowitz2016-03-171-5/+8
| | | | | | | The inclusion of <sys/select.h> is required also by POSIX.1-2001. setitimer is XSI, and futimesat is GNU. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* FreeBSD compatibility for <sys/select.h>Sebastian Huber2015-12-141-4/+2
| | | | | | | | | | | | * libc/include/sys/_sigset.h: New. * libc/include/sys/select.h: Do not include <sys/types.h> and <sys/time.h> to avoid cyclic header file dependencies. Include specialized header files instead. (sigset_t): Conditionally define. * libc/include/sys/signal.h (sigset_t): Likewise. * libc/include/sys/time.h: Include <sys/select.h> if __BSD_VISIBLE. * libc/include/sys/types.h: Likewise.
* Fix sys/time.h build problem due to inconsistent macro usageCorinna Vinschen2015-07-061-0/+1
| | | | | | | | | | | | | https://sourceware.org/ml/newlib/2015/msg00520.html describes how sys/time.h uses __BSD_VISIBLE while the types used in the affected inline functions are guarded with !_POSIX_SOURCE. Fix that by guarding the type with __BSD_VISIBLE as well. * libc/include/sys/time.h: Explicitely include sys/cdefs.h. * libc/include/sys/types.h: Ditto. Guard BSD convenience base types with __BSD_VISIBLE rather than !_POSIX_SOURCE. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert to exposing sys/select.h from sys/time.h on CygwinCorinna Vinschen2015-05-021-0/+6
| | | | | | * libc/include/sys/time.h: Include sys/select.h on Cygwin. Explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add <sys/_stdint.h> for FreeBSD compatibilitySebastian Huber2015-04-231-18/+18
| | | | | | | | | | | | | | | | | | | | * libc/include/sys/_stdint.h: New file. * libc/include/stdint.h (int8_t): Move to <sys/_stdint.h>. (uint8_t): Likewise. (int16_t): Likewise. (uint16_t): Likewise. (int32_t): Likewise. (uint32_t): Likewise. (int64_t): Likewise. (uint64_t): Likewise. (intptr_t): Likewise. (uintptr_t): Likewise. * libc/include/sys/types.h: Include <sys/_stdint.h>. * libc/sys/rtems/machine/_types.h: Remove <stdint.h> include. * libc/sys/time.h>: Replace __uint32_t with uint32_t and __uint64_t with uint64_t. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Replace uint32_t/uint64_t type usage with __uint32_t/__uint64_t.Steve Ellcey2015-04-231-18/+18
| | | | | * libc/include/sys/time.h: Replace uint32_t and uint64_t with __uint32_t and __uint64_t.
* Drop including cygwin/sys_time.h on Cygwin.Corinna Vinschen2015-03-131-4/+0
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Merge parts of <sys/time.h> from FreeBSDSebastian Huber2015-03-131-64/+416
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * libc/include/sys/time.h: #include <sys/cdefs.h> for __BSD_VISIBLE.Corinna Vinschen2015-01-281-0/+1
|
* 2014-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2014-07-221-0/+3
| | | | | * libc/include/sys/time.h: Add prototype for adjtime() and wrap it and settimeofday() prototype with __BSD_VISIBLE.
* 2013-11-22 Bryan Dunsmore <dunsmoreb@gmail.com>Joel Sherrill2013-11-231-3/+4
| | | | | | | * libc/include/sys/time.h (gettimeofday): Add restrict keyword. (setitimer): Likewise. * libc/sys/rdos/gettod.c (gettimeofday): Likewise. * libc/sys/rtems/crt0.c (gettimeofday): Likewise.
* * libc/include/sys/time.h: Avoid guarding other than timeval declaration withChristopher Faylor2012-11-121-20/+19
| | | | _TIMEVAL_DEFINED. Move timeval related macros under _TIMEVAL_DEFINED control.
* Throughout, run newlib with -Wall -Werror option and fix bugs andCorinna Vinschen2012-08-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compiler warnings found this way. * libc/stdio/freopen.c (_freopen_r): Fix bug setting _flags. * libc/include/stdio.h (_rename): Define when building newlib. * libc/include/sys/signal.h (_kill): Ditto. * libc/include/sys/stat.h (_mkdir): Ditto. * libc/include/sys/time.h (_gettimeofday): Ditto. * libc/include/sys/times.h (_times): Ditto. * libc/include/sys/wait.h (_wait): Ditto. * libc/locale/lmessages.c (empty): Don't define for Cygwin. * libc/locale/lmonetary.c (cnv): Ditto. * libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s. * libc/posix/collate.c: Throughout cast to avoid compiler warning. * libc/posix/engine.c (matcher): Initialize dp to avoid compiler warning. * libc/posix/glob.c: Disable on Cygwin. Explain why. * libc/posix/regcomp.c: Fix "uninitialized" compiler warnings. (dissect): Deliberately silence gcc compiler warning. Add comment to explain why. * libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result is never used. * libc/posix/popen.c (popen): Ditto for variable last. * libc/reent/mkdirr.c: Include sys/stat.h. * libc/reent/renamer.c: Include stdio.h. * libc/search/hash.c: Throughout use underscored variants of the stat function family. (init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case. * libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid compiler warning. * libc/search/hash_page.c (overflow_page): Initalize freep to NULL to avoid compiler warning. * libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char * to avoid compiler warning. (asiprintf): Ditto. * libc/stdio/asprintf.c (_asprintf_r): Ditto. (asprintf): Ditto. * libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto. * libc/stdio/vasprintf.c (_vasprintf_r): Ditto. * libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to isdigit to avoid compiler warning. * libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for grouping to avoid compiler warning. Only define and set nseps and nrepeats if they are really used. * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto. Only define state if it is really used. * libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char. (__SVFSCANF_R): Cast fmt in call to __mbtowc. * libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building Cygwin. (JIS_action_table): Ditto. * libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid compiler warning. * libc/string/strcasestr.c: Deliberately silence gcc compiler warning. Add comment to explain why. * libc/time/strptime.c (strptime): Cast to unsigned char in calls to isspace to avoid compiler warning. * libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid compiler warning. * libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid compiler warning. Drop setting it to 0 later. * libm/math/ef_exp.c (__ieee754_expf): Ditto. * libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler warning. * libm/math/ef_pow.c (__ieee754_powf): Ditto. * libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to avoid compiler warning. * libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto. * libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z. * libm/common/sf_round.c (roundf): Remove signbit variable since result is never used.
* Allow building of Cygwin using Mingw64 SDK headers:Corinna Vinschen2012-07-061-2/+2
| | | | | | | | * libc/include/sys/time.h: Drop _WINSOCK_H guard. Just use _TIMEVAL_DEFINED instead. * libc/include/sys/types.h: Check for _WINSOCKAPI_ along with _WINSOCK_H. * libc/include/sys/unistd.h: Ditto.
* 2009-10-09 Dave Korn <dave.korn@artimi.com>Jeff Johnston2009-10-091-0/+1
| | | | | * libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when defining struct timeval.
* 2008-12-11 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2008-12-111-1/+1
| | | | | | * libc/include/sys/time.h(gettimeofday): Change prototype so 2nd parameter is void *, matching SUSV2. * libc/syscalls/sysgettod.c(gettimeofday): Ditto.
* 2008-12-11 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2008-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/include/sys/lock.h: Add void cast to avoid "statement has no effect" warnings from gcc. * libc/include/sys/stdio.h: Ditto. * libc/include/sys/time.h: Correct gettimeofday() prototype. * libc/stdlib/__exp10.c: Add #include "std.h" for function prototype. * libc/stdlib/__ten_mu.c: Ditto. * libc/stdlib/std.h: Correct __exp10's ANSI prototype. * libc/stdlib/ldtoa.c: Change eiisinf definition to ANSI form. (Are already others in file without _ansi method, so did not bother.) * libc/stdlib/system.c: Use _ansi forms for function prototypes and definitions. * libc/time/mktime.c: Ditto. * libc/misc/__dprintf.c: Ditto. * libc/include/stdio.h: Add function prototypes for _fgetc_r, _fgetpos_r, _fsetpos_r, _freopen_r, _rewind_r, freopen64, _freopen64_r, _funopen_r, and _fopencookie_r. * libc/include/reent.h: Add function prototype for _stat64_r, align _execve_r prototype with POSIX definition for execve. * libc/reent/execr.c: Align function prototype with POSIX definition. * libc/stdio/asniprintf.c: Add #include "local.h". * libc/stdio/vasniprintf.c: Ditto. * libc/stdio/fread.c: Remove unused variable newcount. * libc/stdio/local.h: Add function prototype for __sccl. * libc/stdio/open_memstream.c: Remove unused variable flags. * libc/stdio/vfscanf.c: Proper prototyping for ccfn, remove prototype for __sccl since now in local.h. * libc/string/memcpy.c: Add #include <string.h> (for real and for traditional synopsis), remove extraneous stddef.h and limits.h. * libc/syscalls/sysclose.c: Add #include <unistd.h>. * libc/syscalls/sysfork.c: Ditto. * libc/syscalls/sysgetpid.c: Ditto. * libc/syscalls/sysexecve.c: Add #include <unistd.h>, align function prototype with POSIX definition. * libc/syscalls/sysfstat.c: Add #include <sys/stat.h>. * libc/syscalls/sysgettod.c: Correct sys/times.h to sys/time.h. * libc/syscalls/syskill.c: Add #include <signal.h>. * libc/syscalls/syslink.c: Add #include <unistd.h>, fix prototype. * libc/syscalls/sysunlink.c: Ditto. * libc/syscalls/sysstat.c: Add #include <sys/stat.h>, fix prototype. * libc/syscalls/syswait.c: Add #include <sys/wait.h>, fix prototype.
* 2007-07-06 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-07-061-1/+1
| | | | | | | | | | | | | * libc/include/sys/time.h (gettimeofday): Change to proper prototype where second parameter is void *. * libc/reent/gettimeofdayr.c (_gettimeofday_r): Change prototype accordingly. * libc/include/reent.h: Fix prototype for _gettimeofday_r. * libc/sys/arm/syscalls.c: Fix gettimeofday function signature. * libc/sys/rdos/gettod.c: Ditto. * libc/sys/sh/syscalls.c: Ditto. * libc/time/time.c (time): Change call to _gettimeofday_r to pass NULL as 2nd argument.
* * libc/include/sys/time.h (struct timeval): Change member typesCorinna Vinschen2006-02-151-2/+2
| | | | | | | according to SUSv3. * libc/include/sys/types.h (useconds_t): Change to unsigned according to SUSv3. (suseconds_t): Define type.
* * include/sys/time.h: Move more cygwin stuff to cygwin-specific header.Christopher Faylor2005-11-181-4/+0
|
* * include/time.h: Move cygwin declarations to cygwin-specific header.Christopher Faylor2005-11-181-1/+1
| | | | * include/sys/time.h: Rename cygwin include to "sys_time.h".
* * libc/include/sys/time.h: For cygwin, use general header rather than specificChristopher Faylor2005-11-111-1/+1
| | | | "sys/select.h".
* * libc/include/sys/time.h: Declare futimes and lutimes for Cygwin.Corinna Vinschen2005-10-201-0/+4
|
* * libc/include/pwd.h (struct passwd): Change pw_uid and pw_gidCorinna Vinschen2005-02-081-1/+1
| | | | | | members to uid_t and gid_t according to SUSv3. * libc/include/sys/time.h (utimes): Change second parameter to const according to SUSv3.
* * libc/include/sys/time.h: Define timercmp and other macros for __CYGWIN__,Christopher Faylor2001-04-211-2/+2
| | | | too.
* 2000-12-04 Joel Sherrill <joel@OARcorp.com>Jeff Johnston2000-12-041-0/+32
| | | | | * libc/include/sys/time.h: Added BSD timer manipulation macros used by RTEMS code.
* * libc/include/ctype.h: __CYGWIN32__ -> __CYGWIN__Christopher Faylor2000-05-301-2/+2
| | | | | | | | | | | | | | | * libc/include/malloc.h: Ditto. * libc/include/process.h: Ditto. * libc/include/stdio.h: Ditto. * libc/include/stdlib.h: Ditto. * libc/include/time.h: Ditto. * libc/include/machine/setjmp.h: Ditto. * libc/include/sys/errno.h: Ditto. * libc/include/sys/signal.h: Ditto. * libc/include/sys/stat.h: Ditto. * libc/include/sys/time.h: Ditto. * libc/include/sys/unistd.h: Ditto. * libc/include/string.h: Ditto. strsignal should return a const char *.
* import newlib-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+51