History log of /bionic/libc/include/sys/types.h
Revision Date Author Comments
a34817457feee026e8702a1d2dffe9e92b51d7d1 28-Nov-2017 Elliott Hughes <enh@google.com> Improve the _FILE_OFFSET_BITS docs and link to them.

We're still seeing lots of confusion. People do seem to look as far as
the headers, but stop there. So let's try a bit harder to point them in
the right direction.

Also explicitly state that removing _FILE_OFFSET_BITS=64 is the
behavior-preserving fix for compilation problems when upgrading to NDK
r15 or later.

Bug: N/A
Test: N/A
Change-Id: I2d5c65b2fb5cccb9977901e51fea1ad2ccc0fd95
8543f923fe46b958e5061dab6d0440c9e2cd7603 24-May-2017 Elliott Hughes <enh@google.com> Stop including <sys/sysmacros.h> from <sys/types.h>.

<sys/types.h> unconditionally includes <sys/sysmacros.h>.

<sys/sysmacros.h> defines major, minor, and makedev. In the deprecated NDK
headers, these were inline functions. In the unified headers, they are
function-like macros.

The inline functions would only collide with another function called major,
minor, or makedev but the macros will replace anything with a function-like
form such as definitions of class methods called major, minor, or makedev.
This causes code which has such definitions to fail to compile when moving
from the deprecated headers to the unified headers.

Resolve this by removing the transitive dependency. Folks who want
<sys/sysmacros.h> can ask for it explicitly (it's been in both bionic and
glibc for years, though I don't think macOS has it [as usual]).

Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: If2921c7b5d979c3066f199f22c64d4d2f7bf6632
bc94bb362da64dc15994b4a17ab54377670e26e7 14-Dec-2016 Elliott Hughes <enh@google.com> Fix an obsolete comment.

280236537e06c7accaffabf8fb407f93dd1c834f factored the pthread types out
so that they could be in both <sys/types.h> and <pthread.h>.

Bug: N/A
Test: builds
Change-Id: Ie649c938ec8be1c59a0e4ef777f425550f8d4539
280236537e06c7accaffabf8fb407f93dd1c834f 12-Aug-2016 Elliott Hughes <enh@google.com> POSIX says <sys/types.h> should make all the pthread_* types available.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html

Change-Id: I606194e15ceaa3129f266a9a460c358eaa8bf686
9c8d711aa5ee3108a8e1e8959be9d0355ca0fa6a 13-Jun-2016 Elliott Hughes <enh@google.com> Don't expose all BSD extensions.

Just expose the ones that bionic historically leaked.

Also, many of the M_* constants in <math.h> are actually POSIX.

Change-Id: I6275df84c5866b872b71f1c8ed14e2aada12b793
3ba55f8022f3d5c5ca94a3df46fa658eda791987 09-Jun-2016 Elliott Hughes <enh@google.com> Rationalize visibility.

If it's C or POSIX, it's in. If it's BSD or GNU, it's guarded by __USE_BSD
or __USE_GNU.

Bug: https://code.google.com/p/android/issues/detail?id=194631
Change-Id: Ife51a21c2b37b060db56780d29c929805b199cb6
1f1a51aecd7c825418bfedcb66772e92de790149 01-Apr-2016 Elliott Hughes <enh@google.com> Add a few missing types and constants to headers.

This (and other stuff still to come) prevented xfstests from building out
of the box.

Bug: http://b/27952303
Change-Id: Id38fd37386d43fc351c56dca18785a465e3e6145
9361ad3f80adc1e21ab97c8d684afed311788e00 12-Jan-2016 Elliott Hughes <enh@google.com> Fix <sys/sysmacros.h>.

1. The definitions were wrong.
2. The definitions were inline functions.
3. The definitions were polluting the namespace even for code that doesn't
want BSD cruft.

Note that everybody will still get these by default, because you still get
all the BSD stuff by default.

Bug: http://b/12706131
Change-Id: I062ecd09feef7a6e8ba1922d465b96a9c4bf4f4e
68dc20d41193831a94df04b994ff2f601dd38d10 07-Feb-2015 Elliott Hughes <enh@google.com> Implement _FILE_OFFSET_BITS (mostly).

I still don't think we can make stdio's fseeko and ftello work, but we can
have everything else, and very few programs use fseeko/ftello (and they can
just refrain from using _FILE_OFFSET_BITS and be no worse off than they are
today).

Bug: 11865851
Change-Id: Ic3cb409aae6713f4b345de954bcc4241fcd969ec
00fb5f97be5d6d8da10dbaf047004917b9f8c7e4 25-Jun-2014 Elliott Hughes <enh@google.com> Change the LP64 off_t/loff_t/off64_t definitions to reduce warnings.

Code written for glibc can be sloppy about these types on LP64 and
get away with it. It's probably better for our users if these types
are identical rather than just being the same size.

Change-Id: I3dd116d80569d2d101342a552c55f4a18884025b
6726862e9a250e7ade32ba7d150d73352b4ef5c8 06-May-2014 Calin Juravle <calin@google.com> Fix ino_t and suseconds_t

Align ino_t and suseconds_t definitions with kernel
and OpenBSD upstream.

Bug: 14583346
Bug: 12875898
Change-Id: I0d97c6b4fc85b261472575290e6f6f2df1c8a36a
2725ca95b23bc59ac7e7d7d52362c369db180671 12-Mar-2014 Pavel Chupin <pavel.v.chupin@intel.com> Use [u]int32_t instead of __[u]int32_t in sys/types.h

Avoid this error in -ffreestanding mode:
sys/types.h:45:1: error: unknown type name '__uint32_t'

Change-Id: I826b36873862d1d70b47401f31f4369a77666b8e
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
4b558f50a42c97d461f1dede5aaaae490ea99e2e 05-Mar-2014 Elliott Hughes <enh@google.com> Rewrite the POSIX timer functions.

This is a much simpler implementation that lets the kernel
do as much as possible.

Co-authored-by: Jörgen Strand <jorgen.strand@sonymobile.com>
Co-authored-by: Snild Dolkow <snild.dolkow@sonymobile.com>
Change-Id: Iad19f155de977667aea09410266d54e63e8a26bf
ebd90b9ba99cdd49a4a4eea38b1b8654af942e97 08-Feb-2014 Elliott Hughes <enh@google.com> Fix socklen_t (on LP64 only).

Too late to fix LP32 :-(

Bug: 12935461
Change-Id: Ib056ca1eaf9ae8712f88ae21ff94e91b08cf588b
9f87a0b285128542a221f2b69d3b959a4e33c054 07-Feb-2014 Elliott Hughes <enh@google.com> Remove <sys/_types.h>.

Bug: 12213562
Change-Id: I0d10664f9da60739bdbad0408be0dd61eea3c1fe
894f8cb1395d3409bb995d18abc1b3409c557d01 03-Jan-2014 Elliott Hughes <enh@google.com> Fix dev_t (for LP64).

32-bit Android's dev_t was wrong too. We can't fix that without ABI breakage,
but we can at least fix 64-bit Android. And add tests.

Bug: https://code.google.com/p/android/issues/detail?id=54966
Change-Id: Ie2e42cc042b78b669a1a44e55f959dbd9c52c5c9
ad8842f5c67dea52a2b4ce280b612f41846cd2ef 18-Dec-2013 Elliott Hughes <enh@google.com> Don't use __kernel_ulong_t.

Change-Id: Ifdfbac0ac6da647276a84bd64bb342bb5a07ad61
2b333ea31ec5b5b4627f14b22253b017b346638a 18-Dec-2013 Elliott Hughes <enh@google.com> Remove <machine/kernel.h>.

Bug: 12175484
Change-Id: I127f7f91f36bd879109d653e0c56ec56e2529d4d
9c67d4307c6be91618a75f0255e701fc69f3b55f 21-Nov-2013 Elliott Hughes <enh@google.com> Fix useconds_t for LP64.

Change-Id: I869e60484999c1feda3dcdb86bee5b5373e6b3df
ab61eb366ac48addf2bca6093a34455193f5c8df 21-Nov-2013 Elliott Hughes <enh@google.com> Switch to upstream sleep(3) and usleep(3).

Also fix the signature of usleep, and the definition of useconds_t which
should be unsigned, as the 'u' in its name implies.

This patch also cleans up the existing FreeBSD hacks by moving the libm
stuff from <sys/cdefs.h> to a libm-private header, and adding comments
about the hacks we use to build FreeBSD source.

Change-Id: Ibe5067a380502df94a0a3a7901969b35411085b6
2ecc164ae9b8062e29faf5eca491669e2741cab3 08-Nov-2013 Elliott Hughes <enh@google.com> Remove the dependency on the non-uapi __kernel_nlink_t.

The kernel doesn't have an nlink_t; it just uses the equivalent of
uint32_t. We already had a usable __nlink_t in the C library, so
let's just define our nlink_t in terms of __nlink_t, which is what
__nlink_t was meant for anyway.

Note that our struct stat just follows the kernel, and doesn't refer
to nlink_t anyway.

Change-Id: I2a56e418e42404b1741b08c50554b03c11caebae
b4f7616fd618875768b8fffc122b58bdb84a9969 20-Sep-2013 Elliott Hughes <enh@google.com> Ensure we have the off64_t variant of every function that takes an off_t.

Change-Id: Ib2eee0cf13162be3b62559b84e90c6dcf5aab1c3
b6e22482d4fbf62c23707a9096eecd2082a63ef1 09-Mar-2013 Elliott Hughes <enh@google.com> Let bionic use the correct definition of ssize_t.

Bug: 8253769
Change-Id: I50c7cc20828fc089b83580e039ce9153a6c5a8cc
730da15840c998319918da668defcf4a51410b12 28-Feb-2013 Elliott Hughes <enh@google.com> Avoid changing the C++ ABI with ssize_t.

Bug: 8253769
Change-Id: Ia325003ed6e59da553e2bdde7c43515bc191b8ba
e255642dc1178663860104d9da2590056fae8d0b 28-Feb-2013 Elliott Hughes <enh@google.com> Avoid changing the C++ ABI with ssize_t.

Bug: 8253769
Change-Id: Ia325003ed6e59da553e2bdde7c43515bc191b8ba
c641cafbc387849510d7f408e85f72fa3608916d 17-Feb-2013 Thorsten Glaser <tg@mirbsd.org> use architecture-specific ssize_t definition

after change 32822 was rejected, this is the more light-weight
version of the fix: libc/include/sys/types.h already - via
libc/kernel/common/linux/posix_types.h - includes a definition
of __kernel_ssize_t from libc/kernel/arch-*/asm/posix_types.h
which is architecture-specific, toolchain-agnostic and also
gets rid of the gcc -Wformat warning (which it issues correctly,
since this i̲s̲ indeed a bug in bionic)

Change-Id: Ie4503ab16628bc25815a836d07556f665e9795c7
3975cec694a0c9b42e3f7e671fcd678da92836c3 30-Nov-2012 Elliott Hughes <enh@google.com> Remove (near-)duplicate definitions of size_t and ssize_t.

The near duplicates upset fussier compilers that insist that
typedefs be exactly the same, but the fix isn't to make all
copies identical...

Change-Id: Icfdace41726f36ec33c9ae919dbb5a54d3529cc9
0cc0d250fd3097e4c26b70cdeb5c47caac634069 02-Oct-2012 Elliott Hughes <enh@google.com> Remove useless #defines and incorrect claims from header files.

The various __need_* macros were write-only.

Change-Id: Id3cca34188e0801fdf93a038b22f2817226ad9c2
50ace4fec5e8cb5afcbc656a4556fa528adfd760 17-Jun-2010 David 'Digit' Turner <digit@google.com> Remove compiler warnings when building Bionic.

Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.

Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
9f65adf2ba3bb15feb8b7a7b3eef788df3fd270e 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution