summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/localtime.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add _tzset_unlocked and _tzset_unlocked_rCorinna Vinschen2015-04-231-0/+10
| | | | | | | | | | | | | | | | | | | newlib: * libc/time/local.h (_tzset_unlocked_r): Add prototype. (_tzset_unlocked): Ditto. * libc/time/tzset.c (_tzset_unlocked): New function, call _tzset_unlocked_r. (tzset): Lock and call _tzset_unlocked_r. * libc/time/tzset_r (_tzset_unlocked_r): Remove locking and rename from _tzset_r. (_tzset_r): Lock and call _tzset_unlocked_r. cygwin: * localtime.cc (tzset_unlocked): Export as _tzset_unlocked. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * localtime.cc (__cygwin_gettzoffset): New function for access fromCorinna Vinschen2015-01-081-0/+25
| | | | | newlib. (__cygwin_gettzname): Ditto.
* * localtime.cc (tzload): Fix loading latest timezone offsets intoCorinna Vinschen2015-01-071-4/+19
| | | | | | tzinfo from zoneinfo files. Add comment to explain what we do. (tzparse): Add more comments to explain in case of loading timezone offset from other sources.
* * localtime.cc (tzload): Fix leaking memory (CID 60001).Corinna Vinschen2014-06-231-1/+1
|
* * localtime.cc: Define TM_GMTOFF and TM_ZONE based on __TM_GMTOFF andCorinna Vinschen2014-03-051-9/+21
| | | | | | | | | __TM_ZONE being defined. Throughout, write to these struct tm members only if CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS is true. * libc/strptime.cc: Ditto. * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS): Define. (CYGWIN_VERSION_API_MINOR): Bump to 272.
* Throughout, keep function definitions and declarations in sync withCorinna Vinschen2013-11-251-2/+2
| | | | newlib in terms of C99 "restrict" keyword.
* * Makefile.in (localtime_CFLAGS): Define as -fwrapv since localtimeCorinna Vinschen2013-05-141-43/+19
| | | | | code requires int overflows to be fully defined. * localtime.cc: Align a bit more to upstream code.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-657/+998
|
* * localtime.cc (tzload): Don't change global timezone informationCorinna Vinschen2011-04-181-14/+26
| | | | | when called from gmtime or gmtime_r. (tzparse): Ditto.
* * localtime.cc (is_upper): Rename to isupper and include ctype.h to pull inChristopher Faylor2010-10-301-13/+19
| | | | | | | standard macro. (lcl_is_set): Define as an enum. (tzsetwall): Assign lcl_is_set to correct enum values. (tzset): Ditto. Copy as much of TZ as will fit to TZ buffer.
* * localtime.cc (time2): Take another stab at fixing a compiler warning.Corinna Vinschen2009-06-141-1/+1
|
* * localtime.cc (time2): Take a stab at fixing a compiler warning.Christopher Faylor2009-06-141-1/+1
|
* * localtime.cc (time2): Change "spring gap" to "spring forward gap"Corinna Vinschen2009-06-121-3/+3
| | | | in comment.
* * localtime.cc (time2): Add workaround for spring gap problem. AddCorinna Vinschen2009-06-121-1/+22
| | | | explaining comment.
* * localtime.cc (tzload): Implement setting __tzrule's offset memberCorinna Vinschen2009-04-141-0/+4
| | | | | using newlib's __gettzinfo () interface also when tzload returns successfully.
* * localtime.cc (increment_overflow): Mark as non-inline to prevent compilerChristopher Faylor2008-09-111-1/+2
| | | | | | | | | | from complaining about the very thing we're trying to test. * ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error. * sched.cc (sched_rr_get_interval): Ditto. * select.cc (peek_serial): Ditto. * libc/rexec.cc (ruserpass): Ditto. * posix_ipc.cc (ipc_names): Make static to avoid a compiler warning (and it's the right thing to do anyway).
* Remove unneeded header files from source files throughout.Christopher Faylor2008-04-071-5/+0
|
* * localtime.cc (tzset): Guard by a muto for thread safety.Corinna Vinschen2007-12-111-3/+9
|
* * localtime.cc (tzset): Call tzsetwall only if it hasn't beenCorinna Vinschen2007-12-111-1/+2
| | | | called before.
* * localtime.cc (tzsetwall): Don't set TZ.Corinna Vinschen2007-08-011-0/+4
|
* * libc: Add subdirectory.Corinna Vinschen2005-11-181-0/+1
| | | | | | | | | | | | | * Makefile.in (VPATH): Add libc subdir. (DLL_OFILES): Add strptime.o and timelocal.o. * cygwin.din: Export timelocal and timegm. * localtime.cc: Define STD_INSPIRED unconditionally. * include/cygwin/time.h (timelocal): Add declaration. (timegm): Ditto. * include/cygwin/version.h: Bump API minor version. * libc/strptime.cc: New file. * libc/timelocal.cc: New file. * libc/timelocal.h: New file.
* Eliminate (void) cast on standalone function calls throughout.Christopher Faylor2005-07-061-9/+9
|
* * localtime.cc: Implement setting __tzrule's offset member usingCorinna Vinschen2005-02-231-23/+13
| | | | | | newlib's __gettzinfo () interface. (__tzrule): Remove. (timezone): Define as long according to POSIX.
* * localtime.cc: Temporary implementation of setting __tzrule's offsetCorinna Vinschen2005-02-191-0/+20
| | | | | | member to be used by strftime. (__tzrule): New global variable. (tzparse): Set __tzrule's offset member appropriately.
* * localtime.cc (localtime_r): Call tzset.Christopher Faylor2004-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Makefile.in: Make version.h/cygwin.din version check a warning since it is not foolproof. * cygheap.h (CYGHEAPSIZE): Bump size down. * cygtls.h (_threadinfo::stacklock): New element. (_threadinfo::pop): Make regparm. (_threadinfo::lock): New function. (_threadinfo::unlock): New function. * cygtls.cc (_threadinfo::push): Wait for a lock on the stack before performing the operation. (_threadinfo::pop): Move to another file. * cygwin.din: More SIGFE changes. * exceptions.cc (try_to_debug): Always display messages on console. (handle_exceptions): Unwind stack only when actually about to call sig_send. (setup_handler): Lock stack prior to performing any operations. * gendef (_sigfe): Ditto. (_sigbe): Ditto. (_threadinfo::pop): Ditto. Move here. * gen_tlsoffsets: Generate positive offsets. * tlsoffsets.h: Regenerate.
* Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,Christopher Faylor2003-12-071-32/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | throughout. * tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit some comments. * cygheap.h (init_cygheap::ctty): Add new element. * devices.in (device::parse): Remove special handling for /dev/tty. * devices.cc: Regenerate. * dtable.cc (build_fh_pc): Don't reset /dev/tty device. Let the device opener do that. * fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting noninherit flag for ctty. * tty.h: Move BOOLs to bools. (tty_min::set_ctty): Redeclare to _pinfo class. * pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty. Change first argument from tty number to tty_min class. * pinfo.h (_pinfo::set_ctty): Declare. * fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of set_ctty to _pinfo class. * fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially. Use saved cygheap value if it exists. Otherwise convert to real device and save on first time open. (fhandler_tty_common::dup): Potentially set controlling tty if duping a slave tty. * syscalls.cc (setsid): Close controlling tty in cygheap. * tty.cc: Change some BOOLs to bools.
* * include/tzfile.h: Remove duplicate definition of TM_SUNDAY.Corinna Vinschen2003-12-011-1/+1
| | | | | * localtime.cc: Point TZDIR to the /usr/share/zoneinfo directory used by the tzcode package.
* 2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet2002-12-201-1/+3
| | | | | * localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname in the Cygwin specific part of the routine.
* More GNUify non-GNU formatted functions calls throughout.Christopher Faylor2002-09-231-3/+3
|
* * localtime.cc (tzsetwall): Use wildabbr if generated timezone nameCorinna Vinschen2002-05-071-7/+7
| | | | length < 3.
* Fix up comments.Christopher Faylor2001-12-191-3/+0
|
* * autoload.cc (wsock_init): Reorganize slightly to accomodate a new compiler.Christopher Faylor2001-10-131-1/+1
|
* Move appropriate variables to NO_COPY segment, throughout.Christopher Faylor2001-09-061-2/+2
|
* Remove initialization of static or global values to zero, throughout. ThisChristopher Faylor2001-09-061-3/+3
| | | | | | just needlessly grows the size of the DLL. * tty.cc (tty::alive): Make inuse handle non-inheriting on open, just for thread safety.
* * localtime.c: Changed whole file to become C++ clean. Rename toCorinna Vinschen2001-07-251-0/+2163
localtime.cc. * localtime.cc (tzload): Preserve errno.