Re: nanosleep truncated on 64 bit Linux by 292 billion years

2014-10-28 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Pádraig Brady wrote: > I noticed that nanosleep() on 64 bit, "only" supports 292 years, > rather than the full potential 292 billion years with 64 bit time_t, due to: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/time.h?id=refs/tags/v3.16#

[PATCH] 64-bit obstack support

2014-10-28 Thread Alan Modra
And >2G on 32-bit. * include/gnu-versions.h (_GNU_OBSTACK_INTERFACE_VERSION): Bump. * include/obstack.h: Include shlib-compat.h and gnu-versions.h. (_OBSTACK_ELIDE_CODE, _OBSTACK_NO_ERROR_HANDLER, _OBSTACK_COMPAT, _OBSTACK_ALIAS): Define. (_obstack_allocated

[PATCH 0/5] obstacks again

2014-10-28 Thread Alan Modra
This is a revised series, adding the SHLIB_COMPAT support Roland McGrath requested for glibc, and omitting patch 5/5 in the previous series that Paul Eggert disliked, with reason. I've also moved as much of the glibc specific code out of gnulib as I could, and abandoned the idea of renaming versio

[PATCH 5/5] 64-bit obstack support, part 3

2014-10-28 Thread Alan Modra
This finally enables full 64-bit obstack support. The glibc shared library specific code is removed from obstack.c too, and the error handling code conditionally compiled under control of another macro, _OBSTACK_NO_ERROR_HANDLER. * lib/obstack.h: Include string.h earlier. (_OBSTAC

[PATCH 2/5] obstack tidy part 2

2014-10-28 Thread Alan Modra
a) Don't be concerned about "not polluting the namespace with stddef.h symbols" in obstack.h, since gnulib string.h includes stddef.h anyway, and it seems unlikely that anyone would care. b) Don't roll our own slow memcpy in _obstack_newchunk. c) Rename obstack_free to _obstack_free. This ma

[PATCH 3/5] 64-bit obstack support, part 1

2014-10-28 Thread Alan Modra
a) Correct calls to alloc function, to use a size_t arg. "long" is just wrong on targets like x86_64-mingw64 where "long" is 32 bits and "size_t" 64 bits. b) Consolidate _obstack_begin and _obstack_begin1 code. * lib/obstack.h (struct obstack ): Correct prototype to use "siz

[PATCH 4/5] 64-bit obstack support, part 2

2014-10-28 Thread Alan Modra
This gets us 4G obstack support, without changing ABI compatibility, apart from possibly introducing some signed/unsigned comparison warnings in code that uses obstack.h. a) Replace "int" size parameters, return values, and macro local vars with _OBSTACK_SIZE_T, an "unsigned int" for now. b) Ma

[PATCH 1/5] obstack tidy part 1

2014-10-28 Thread Alan Modra
a) Rename temp fields. temp.tempint and temp.tempptr just looks ugly to me, and result in overlong lines after later patches. b) Move error handling code, to avoid a forward declaration and to simplify later patches in this series. * lib/obstack.h (struct obstack ): Rename fields of