search for: gmtime_r

Displaying 20 results from an estimated 25 matches for "gmtime_r".

Did you mean: mtime_r
2012 Oct 03
3
2.4-beta fixes for MinGW
...{ -------------- next part -------------- --- icecast-2.3.99.0/src/fserve.c.orig 2012-10-02 14:52:41 +0400 +++ icecast-2.3.99.0/src/fserve.c 2012-10-02 15:31:11 +0400 @@ -560,6 +560,7 @@ time_t now; int strflen; struct tm result; + struct tm *gmtime_result; off_t endpos = rangenumber+new_content_len-1; char *type; @@ -567,8 +568,18 @@ endpos = 0; } time(&now); +#if !defined(_WIN32) + gmtime_result = gmtime_r(&now, &result) +#else + /* gmtime(...
2005 Feb 18
1
creating POSIXct dates in C
...were in GMT // how do we convert this time to our timezone // taking into account that the offset is not // constant, since daylight savings time // will shift the offset by an hour // for certain times printf("%d\n",(double)localtime_posix); // now convert it to gmtime gmtime_r(&localtime_posix, &utc_tm); utc_posix = mktime(&utc_tm); // this still prints 0 // how do I convert it to a utc time // representing 1970-01-01 in EST ?? printf("%d\n",(double)utc_posix); } > R.Version() $platform [1] "i686-pc-linux-gnu" $arch [1] &q...
2003 Sep 29
1
openssh-3-7-1p2 compiling problems on Reliant UNIX
...clientloop.o sshtty.o sshconnect.o > sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib > -L/usr/local/lib -lssh -lopenbsd-compat -lz -lsocket -lnsl -lgen -lcrypto > Undefined first referenced > symbol in file > gmtime_r /usr/local/ssl/lib/libcrypto.a(o_time.o) > cma_sigaction > /usr/local/ssl/lib/libcrypto.a(ui_openssl.o) > ld: ssh: fatal error: Symbol referencing errors. No output written to ssh > make: *** Error code 1 That looks like your libcrypto is compiled with the re...
2022 Jun 23
2
NUT on Windows revival
...ntl() code to avoid FD leaks to forked children, is it doable on Windows? * loading dlls from one dir, without copies near every exe (see common.c) * automatically tracking major version number X (from client/Makefile.am) for LTDL discovery of libupsclient-X.dll without hardcoding it * localtime_r, gmtime_r use ugly fallbacks where unavoidable * usb close_dev() crashes * not all dependencies were tried, probably more build warnings are lurking to clean up * installer not investigated * code mostly looks at "WIN32" macro as a big switch; there should be more specific configure-script tests fo...
2022 Jun 23
2
NUT on Windows revival
...ntl() code to avoid FD leaks to forked children, is it doable on Windows? * loading dlls from one dir, without copies near every exe (see common.c) * automatically tracking major version number X (from client/Makefile.am) for LTDL discovery of libupsclient-X.dll without hardcoding it * localtime_r, gmtime_r use ugly fallbacks where unavoidable * usb close_dev() crashes * not all dependencies were tried, probably more build warnings are lurking to clean up * installer not investigated * code mostly looks at "WIN32" macro as a big switch; there should be more specific configure-script tests fo...
2011 Aug 13
2
[Hivex] [PATCH v3] Report last-modified time of hive root and nodes
...letime_to_8601 (int64_t windows_ticks) +{ + char *ret = calloc (1 + TIMESTAMP_BUF_LEN, sizeof (char)); + if (ret == NULL) { + goto error_other; + } + uint64_t nanos = windows_ticks % WINDOWS_TICK; + time_t tt = (windows_ticks / WINDOWS_TICK - SEC_TO_UNIX_EPOCH); + struct tm time_tm; + if (gmtime_r (&tt, &time_tm) == NULL) { + fprintf (stderr, "filetime_to_8601: Error running gmtime_r on timestamp (decimal hundreds of ns: %" PRIu64 ").\n", windows_ticks); + goto error_cleanup; + } + if (strftime (ret, TIMESTAMP_BUF_LEN, "%FT%TZ", &time_tm) ==...
2022 Jul 13
2
NUT on Windows revival
...aks to forked children, is it doable on > Windows? > * loading dlls from one dir, without copies near every exe (see common.c) > * automatically tracking major version number X (from client/Makefile.am) > for LTDL discovery of libupsclient-X.dll without hardcoding it > * localtime_r, gmtime_r use ugly fallbacks where unavoidable > * usb close_dev() crashes > * not all dependencies were tried, probably more build warnings are > lurking to clean up > * installer not investigated > * code mostly looks at "WIN32" macro as a big switch; there should be more > spec...
2022 Jul 13
2
NUT on Windows revival
...aks to forked children, is it doable on > Windows? > * loading dlls from one dir, without copies near every exe (see common.c) > * automatically tracking major version number X (from client/Makefile.am) > for LTDL discovery of libupsclient-X.dll without hardcoding it > * localtime_r, gmtime_r use ugly fallbacks where unavoidable > * usb close_dev() crashes > * not all dependencies were tried, probably more build warnings are > lurking to clean up > * installer not investigated > * code mostly looks at "WIN32" macro as a big switch; there should be more > spec...
2011 Aug 10
1
[PATCH] Report last-modified time of hive root and nodes
...ks) +{ + if (buf == NULL) { + fprintf (stderr, "filetime_to_8601: Received null output buffer, unable to proceed.\n"); + return -1; + } + uint64_t nanos = windows_ticks % WINDOWS_TICK; + time_t tt = (windows_ticks / WINDOWS_TICK - SEC_TO_UNIX_EPOCH); + struct tm time_tm; + if (gmtime_r (&tt, &time_tm) == NULL) { + fprintf (stderr, "filetime_to_8601: Error running gmtime_r on timestamp (decimal hundreds of ns: %" PRIu64 ").\n", windows_ticks); + return -1; + } + strftime(buf, bufsize, "%FT%TZ", &time_tm); + return 0; +} + #define...
2008 Aug 25
2
patch for native iphone support
...} + if (!rangeproblem) { + char currenttime[50]; + time_t now; + int strflen; + struct tm result; + time(&now); + strflen = strftime(currenttime, 50, "%a, %d-%b-%Y %X GMT", + gmtime_r(&now, &result)); + client->respcode = 206; + + bytes = snprintf (ptr, remaining, "Date: %s\r\n", currenttime); + if (bytes > 0) + { + remaining -= bytes; + ptr += bytes; + } + byt...
2008 Nov 29
0
Icecast Streaming to an iPhone or iPod touch
...char currenttime[50]; + time_t now; + int strflen; + struct tm result; + time(&now); + strflen = strftime(currenttime, 50, "%a, %d-%b-%Y %X GMT", + gmtime_r(&now, &result)); + client->respcode = 206; + bytes = snprintf(ptr, remaining, "Date: %s\r\n", currenttime); + if (bytes > 0) + { + remaining -= bytes; + ptr += byt...
2011 Aug 10
1
[Hivex][PATCH v2] Report last-modified time of hive root and nodes
...ks) +{ + if (buf == NULL) { + fprintf (stderr, "filetime_to_8601: Received null output buffer, unable to proceed.\n"); + return -1; + } + uint64_t nanos = windows_ticks % WINDOWS_TICK; + time_t tt = (windows_ticks / WINDOWS_TICK - SEC_TO_UNIX_EPOCH); + struct tm time_tm; + if (gmtime_r (&tt, &time_tm) == NULL) { + fprintf (stderr, "filetime_to_8601: Error running gmtime_r on timestamp (decimal hundreds of ns: %" PRIu64 ").\n", windows_ticks); + return -1; + } + strftime(buf, bufsize, "%FT%TZ", &time_tm); + return 0; +} + #define...
2022 Aug 21
1
NUT on Windows revival
...en, is it doable on >> Windows? >> * loading dlls from one dir, without copies near every exe (see common.c) >> * automatically tracking major version number X (from client/Makefile.am) >> for LTDL discovery of libupsclient-X.dll without hardcoding it >> * localtime_r, gmtime_r use ugly fallbacks where unavoidable >> * usb close_dev() crashes >> * not all dependencies were tried, probably more build warnings are >> lurking to clean up >> * installer not investigated >> * code mostly looks at "WIN32" macro as a big switch; there shou...
2022 Aug 21
1
NUT on Windows revival
...en, is it doable on >> Windows? >> * loading dlls from one dir, without copies near every exe (see common.c) >> * automatically tracking major version number X (from client/Makefile.am) >> for LTDL discovery of libupsclient-X.dll without hardcoding it >> * localtime_r, gmtime_r use ugly fallbacks where unavoidable >> * usb close_dev() crashes >> * not all dependencies were tried, probably more build warnings are >> lurking to clean up >> * installer not investigated >> * code mostly looks at "WIN32" macro as a big switch; there shou...
2022 Sep 03
0
NUT on Windows revival
...Windows? >>> * loading dlls from one dir, without copies near every exe (see common.c) >>> * automatically tracking major version number X (from >>> client/Makefile.am) for LTDL discovery of libupsclient-X.dll without >>> hardcoding it >>> * localtime_r, gmtime_r use ugly fallbacks where unavoidable >>> * usb close_dev() crashes >>> * not all dependencies were tried, probably more build warnings are >>> lurking to clean up >>> * installer not investigated >>> * code mostly looks at "WIN32" macro as a bi...
2022 Sep 03
0
NUT on Windows revival
...Windows? >>> * loading dlls from one dir, without copies near every exe (see common.c) >>> * automatically tracking major version number X (from >>> client/Makefile.am) for LTDL discovery of libupsclient-X.dll without >>> hardcoding it >>> * localtime_r, gmtime_r use ugly fallbacks where unavoidable >>> * usb close_dev() crashes >>> * not all dependencies were tried, probably more build warnings are >>> lurking to clean up >>> * installer not investigated >>> * code mostly looks at "WIN32" macro as a bi...
2018 Dec 02
0
[PATCH nbdkit 2/4] valgrind: Add --show-leak-kinds=all and comprehensive list of suppressions.
...# deliberately don't run dlclose because otherwise valgrind cannot +# print symbols. So it's expected that dlopen will leak. +{ + glibc_2 + Memcheck:Leak + ... + obj:/usr/lib*/libdl-* +} + +# bindtextdomain leaks. +{ + glibc_3 + Memcheck:Leak + ... + fun:bindtextdomain +} + +# Both gmtime_r and locatime_r leak some sort of timezone- related +# struct inside glibc. These are used by the log filter and the +# floppy plugin. +{ + glibc_4 + Memcheck:Leak + fun:malloc + ... + fun:tzset_internal +} + +# __printf_chk leaks. +{ + glibc_5 + Memcheck:Leak + fun:malloc + ... + fun:__p...
2018 Jan 28
0
[nbdkit PATCH 2/2] filters: Add log filter
...nst char *act, uint64_t id, const char *fmt, ...) +{ + va_list args; + struct timeval tv; + struct tm tm; + char timestamp[27] = "Time unknown"; + + /* Logging is best effort, so ignore failure to get timestamp */ + if (!gettimeofday (&tv, NULL)) + { + size_t s; + + gmtime_r (&tv.tv_sec, &tm); + s = strftime (timestamp, sizeof timestamp, "%F %T", &tm); + assert (s); + s = snprintf (timestamp + s, sizeof timestamp - s, ".%06ld", + 0L + tv.tv_usec); + } + flockfile (logfile); + fprintf (logfile, &quot...
2018 Jan 28
3
[nbdkit PATCH 0/2] RFC: tweak error handling, add log filter
Here's what I'm currently playing with; I'm not ready to commit anything until I rebase my FUA work on top of this, as I only want to break filter ABI once between releases. Eric Blake (2): backend: Rework internal/filter error return semantics filters: Add log filter TODO | 2 - docs/nbdkit-filter.pod | 84 +++++++-- docs/nbdkit.pod
2018 Dec 02
10
[PATCH nbdkit 0/4] Multiple valgrind improvements and possible security fix.
I worked out why valgrind wasn't being applied to nbdkit when run by many of the tests (patches 1-2). Unfortunately I'm not able to make it actually fail tests when valgrind fails. Although the situation is marginally improved in that you can now manually examine the *.log files and find valgrind failures that way. Also adds valgrinding of the Python plugin (patch 3). Along the way I