glib/glib
Ryan Lortie d614312546 gmain: rework g_get_monotonic_time() a bit
We now assume the existence of clock_gettime() and CLOCK_MONOTONIC as
specified by POSIX.1-2001.  This means that we always return truly
monotonic time, which will prevent problems in the case that the user
changes the time.

Mac OS doesn't have clock_gettime() but it does have
mach_absolute_time(), so we can use that there.

We keep our Windows case as well (although we should simplify it once XP
hits EOL later this year).

This patch removes the fallback to gettimeofday() in case of missing
clock_gettime().  We no longer have any way to test this codepath and
therefore it must go.

This patch also restructures the #ifdef a bit so that we repeat the
entire function definition inside of #ifdef instead of just the entire
body of one function.

https://bugzilla.gnome.org/show_bug.cgi?id=724687
2014-02-20 17:52:49 -05:00
..
deprecated docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
glib-mirroring-tab Use 'dumb quotes' rather than `really dumb quotes' 2013-05-21 11:23:22 -03:00
gnulib Updated FSF's address 2014-01-31 14:31:55 +01:00
libcharset Updated FSF's address 2014-01-31 14:31:55 +01:00
pcre Require C90 compliance 2013-11-20 09:16:16 -05:00
tests only '#pragma GCC' outside of functions 2014-02-15 10:31:52 -05:00
update-pcre Rework the build system for a new tests approach 2013-05-31 23:12:15 -04:00
.gitignore update .gitignores 2011-06-12 16:17:30 -04:00
docs.c Docs: Drop entities, switch away from sgml mode 2014-02-09 02:07:26 -05:00
galloca.h Updated FSF's address 2014-01-31 14:31:55 +01:00
garray.c docs: let go of * 2014-02-14 21:33:36 -05:00
garray.h GArray: Documentation cleanups 2014-02-01 20:46:29 -05:00
gasyncqueue.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gasyncqueue.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gasyncqueueprivate.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gatomic.c docs: Remove some unneeded decorations 2014-02-14 21:39:11 -05:00
gatomic.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gbacktrace.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
gbacktrace.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gbase64.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gbase64.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gbitlock.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gbitlock.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gbookmarkfile.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gbookmarkfile.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gbsearcharray.h Require C90 compliance 2013-11-20 09:16:16 -05:00
gbytes.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gbytes.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gcharset.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gcharset.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gcharsetprivate.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gchecksum.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gchecksum.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gconstructor.h Move constructor macros to an internal header and into generated code 2012-01-30 16:59:27 +01:00
gconvert.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gconvert.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gdataset.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gdataset.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gdatasetprivate.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gdate.c Eradicate links and xrefs 2014-02-08 12:26:56 -05:00
gdate.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gdatetime.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gdatetime.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gdir.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gdir.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gen-iswide-table.py Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjk 2011-04-29 18:03:24 -04:00
gen-script-table.pl Bug 491554 – Update to Unicode 5.1.0 2008-04-08 02:59:05 +00:00
gen-unicode-tables.pl Restore executability for other files 2014-01-31 09:36:52 -05:00
genviron.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
genviron.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gerror.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gerror.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gfileutils.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gfileutils.h Updated FSF's address 2014-01-31 14:31:55 +01:00
ggettext.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
ggettext.h Updated FSF's address 2014-01-31 14:31:55 +01:00
ghash.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
ghash.h Updated FSF's address 2014-01-31 14:31:55 +01:00
ghmac.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
ghmac.h Updated FSF's address 2014-01-31 14:31:55 +01:00
ghook.c Docs: Drop entities, switch away from sgml mode 2014-02-09 02:07:26 -05:00
ghook.h Updated FSF's address 2014-01-31 14:31:55 +01:00
ghostutils.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
ghostutils.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gi18n-lib.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gi18n.h Updated FSF's address 2014-01-31 14:31:55 +01:00
giochannel.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
giochannel.h Updated FSF's address 2014-01-31 14:31:55 +01:00
giounix.c Updated FSF's address 2014-01-31 14:31:55 +01:00
giowin32.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gkeyfile.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gkeyfile.h Updated FSF's address 2014-01-31 14:31:55 +01:00
glib_probes.d Add some mainloop instrumentation 2013-11-23 00:22:09 -05:00
glib_trace.h Updated FSF's address 2014-01-31 14:31:55 +01:00
glib-init.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
glib-init.h Updated FSF's address 2014-01-31 14:31:55 +01:00
glib-object.h Updated FSF's address 2014-01-31 14:31:55 +01:00
glib-private.c Updated FSF's address 2014-01-31 14:31:55 +01:00
glib-private.h Updated FSF's address 2014-01-31 14:31:55 +01:00
glib-unix.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
glib-unix.h docs: Remove a few trailing <literal>s 2014-02-14 21:49:42 -05:00
glib.h Updated FSF's address 2014-01-31 14:31:55 +01:00
glib.py Make gdb pretty-printers compatible with Python3 2013-12-18 07:22:16 +11:00
glib.rc.in Update the year in the *.rc.in files 2011-06-07 08:55:31 +08:00
glib.stp.in Add some mainloop instrumentation 2013-11-23 00:22:09 -05:00
glibconfig.h.win32.in Remove alleged support for last-millennium Unixes 2013-11-20 09:16:16 -05:00
glibintl.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
glist.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
glist.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gmacros.h Docs: Don't use the note tag 2014-01-31 18:20:06 -05:00
gmain-internal.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gmain.c gmain: rework g_get_monotonic_time() a bit 2014-02-20 17:52:49 -05:00
gmain.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gmappedfile.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gmappedfile.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gmarkup.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gmarkup.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gmem.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gmem.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gmessages.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gmessages.h Be more clear that g_return_if_fail is undefined behaviour 2014-02-11 15:01:58 +00:00
gmirroringtable.h Bug 491554 – Update to Unicode 5.1.0 2008-04-08 02:59:05 +00:00
gnode.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gnode.h Updated FSF's address 2014-01-31 14:31:55 +01:00
goption.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
goption.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gpattern.c Avoid another gtk-doc warning 2014-02-01 20:49:59 -05:00
gpattern.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gpoll.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gpoll.h Formatting cleanups 2014-02-01 20:50:33 -05:00
gprimes.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gprimes.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gprintf.c Eradicate links and xrefs 2014-02-08 12:26:56 -05:00
gprintf.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gprintfint.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gqsort.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gqsort.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gquark.c Eradicate links and xrefs 2014-02-08 12:26:56 -05:00
gquark.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gqueue.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gqueue.h Updated FSF's address 2014-01-31 14:31:55 +01:00
grand.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
grand.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gregex.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gregex.h GRegex: add g_regex_get_max_lookbehind() 2013-07-23 15:43:22 +02:00
gscanner.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
gscanner.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gscripttable.h unicode: Update to unicode 6.3.0 2013-10-02 18:22:16 +02:00
gsequence.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gsequence.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gshell.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gshell.h various: add GLIB_AVAILABLE_IN_ALL everywhere else 2013-01-13 13:11:57 -05:00
gslice.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gslice.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gslist.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gslist.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gspawn-win32-helper.c glib/gspawn-win32-helper.c: Clean up a bit 2013-11-11 22:37:10 +08:00
gspawn-win32.c win32: misc warning fixes 2012-11-15 14:19:06 -05:00
gspawn.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gspawn.h gspawn: support creating pipes with O_CLOEXEC 2013-10-17 14:32:41 -04:00
gstdio.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gstdio.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gstrfuncs.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gstrfuncs.h gstrfuncs: Fix up gtk-doc warnings 2014-02-01 20:51:53 -05:00
gstring.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gstring.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gstringchunk.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gstringchunk.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtester-report Restore executability for other files 2014-01-31 09:36:52 -05:00
gtester.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gtestutils.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gtestutils.h docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gthread-posix.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gthread-win32.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gthread.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gthread.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gthreadpool.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gthreadpool.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gthreadprivate.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtimer.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gtimer.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtimezone.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
gtimezone.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtrashstack.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
gtrashstack.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtree.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gtree.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtypes.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gunibreak.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gunibreak.h unicode: Update to unicode 6.3.0 2013-10-02 18:22:16 +02:00
gunichartables.h unicode: Update to unicode 6.3.0 2013-10-02 18:22:16 +02:00
gunicode.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gunicodeprivate.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gunicollate.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gunicomp.h unicode: Update to unicode 6.2.0 beta 2012-10-03 13:58:19 +02:00
gunidecomp.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gunidecomp.h unicode: Update to unicode 6.2.0 beta 2012-10-03 13:58:19 +02:00
guniprop.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gurifuncs.c Convert external links to markdown syntax 2014-02-05 21:23:28 -05:00
gurifuncs.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gutf8.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gutils.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gutils.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gvariant-core.c Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
gvariant-core.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gvariant-internal.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gvariant-parser.c Eradicate links and xrefs 2014-02-08 12:26:56 -05:00
gvariant-serialiser.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gvariant-serialiser.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gvariant.c docs: let go of &ast; 2014-02-14 21:33:36 -05:00
gvariant.h add GVariantDict 2014-02-04 11:56:06 +00:00
gvarianttype.c Convert GVariantType table to a list 2014-02-08 13:43:16 -05:00
gvarianttype.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gvarianttypeinfo.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gvarianttypeinfo.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gversion.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gversion.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gversionmacros.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gwakeup.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gwakeup.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gwin32.c docs: use "Returns:" consistently 2014-02-19 19:41:52 -05:00
gwin32.h Updated FSF's address 2014-01-31 14:31:55 +01:00
libglib-gdb.py.in Avoid shadowing dir builtin 2010-12-03 14:41:06 -05:00
Makefile.am win32: fixup lib.exe invocation 2014-02-15 16:55:25 -05:00
makefile.msc.in win32: Use timeGetTime as monotonic base 2011-11-16 09:10:46 +01:00
valgrind.h valgrind.h: add "r0" to the clobber list on PPC 2013-12-16 14:55:28 -05:00
win_iconv.c win32: misc warning fixes 2012-11-15 14:19:06 -05:00