History log of /bionic/libc/include/sys/stat.h
Revision Date Author Comments
466dbe444446da0a8729ae9ac7294f54276e29d7 29-Jan-2015 Dan Albert <danalbert@google.com> Put back inline definitions if using an old API.

All these inlines were turned in to out of line definitions in L.
This brings us a step closer to being able to just use the current
bionic headers for the NDK, rather than having many old versions of
them.

Change-Id: Ie010bc727d78d3742abc577c70f6578db2e68625
86d2feef9f4df517dd5755b39b993bec0c3e1ea5 15-Jan-2015 Raghu Gandham <raghu.gandham@imgtec.com> Modify MIPS64 stat structure to match a generic one in AOSP.

The kernel version of the stat structure is used during the syscalls. After the syscall,
the kernel stat structure is converted to match the generic one. Eventually we would like
the generic stat structure and related syscalls be added to MIPS64 kernel, removing the
thunks added to AOSP.

Change-Id: I7764e80278c1cc8254754c3531ec2dda7544a8ec
9257c477aeafe6b48cb0b7ed8c63f4f2b88453ee 19-Dec-2014 Elliott Hughes <enh@google.com> Fix the types of some of the struct stat fields.

Bug: 17062519
Change-Id: I5207867939f3c2876bf6448e565fa4364aa7e4f0
0c92e8c3d19de86282d5f95ea0fdc7ff5cd9ed03 19-Dec-2014 Elliott Hughes <enh@google.com> Remove bogus #include <endian.h> from <sys/stat.h>.

Bug: 17062519
Change-Id: I3dc21ee8b90580f112c73c72aff5d3bec4778026
1c52e6c92631c694fa30b4e0312da31fb093acfd 18-Dec-2014 Elliott Hughes <enh@google.com> Fix struct stat member types for x86-64.

Bug: 17062519
Change-Id: I93b1e8b1d4b6918ab7c3a985e2f7da277077375e
db4990373232182a897e10663344c429f5d1b2d5 10-Dec-2014 Yabin Cui <yabinc@google.com> Use machine/timespec.h to separate timespec definition.

Bug: 18627763
Change-Id: Ib1c406320f0ecc3705d19183a48f986cdf57c279
e6ac9bb8a054c5a6df23e4c4ca3c17b45959bfd3 10-Nov-2014 Elliott Hughes <enh@google.com> Remove temporary compatibility hack.

The callers have been fixed.

Bug: 18298106
Change-Id: I65e24032d0a82c4b118abace854d2dcdada881fb
0ac0df84c7e96cca6abb800488462b7dfba86622 08-Nov-2014 Elliott Hughes <enh@google.com> Fix struct stat to match POSIX 2008.

Our representation of sub-second times matched the Linux kernel, and we
provided macros for glibc source compatibility. This change switches us
over to match POSIX 2008, adds the macros they insist on (for compatibility
with earlier versions of POSIX), and also adds macros for compatibility
with any code that expects the kernel or old bionic names.

Unfortunately this breaks strace which defines its own structures using
the kernel names, and thus implicitly assumes that there are no macros with
those names, but this does allow the rest of the tree to build.

Bug: 18298106
Change-Id: Ibfa8c21cb2a2566091ef3dc2019a9f78d2de2991
ca8e84c6ff55640aef94d25a86a25778a542bfc2 24-Oct-2014 Elliott Hughes <enh@google.com> Add mkfifoat(3).

Looks like I missed one of the *at functions when I added the rest.

Change-Id: If16de82dbf6f9a3ea7bfdcba406ca1c74a3f2279
55ee845b8ec0861d09197b32fbb5f2d34320155d 07-Oct-2014 Dan Albert <danalbert@google.com> Inline helpers need to be exported unmangled.

__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.

The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.

(cherry-pick of 658727e111ed6dee7be5239494f0764f7b1b02f8 with conflicts
in stdio.h and string.h.)

Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
658727e111ed6dee7be5239494f0764f7b1b02f8 07-Oct-2014 Dan Albert <danalbert@google.com> Inline helpers need to be exported unmangled.

__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.

The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.

Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
d87d401ab134996d1f25f5b63cefb48b5b5877c8 18-Aug-2014 Elliott Hughes <enh@google.com> Improve <sys/cdefs.h>.

Fix and use __RENAME (and lose ___RENAME --- two underscores should be
enough for anybody). This was the point of this change, because I want
to use __RENAME to support the two basename variants and the two
strerror_r variants.

Lose a bunch of macros that weren't being used.

Lose three dead files from the DNS code.

Bug: 17784968

(cherry picked from commit 2cfb4e8e2e217ef0e4140dcbf9b3da809781158c)

Change-Id: I5e96146f92c0521248c78c0933bec5e9a9818222
f4c948a9e9b616c4f133f9495dacb105e51b3e49 19-Aug-2014 Elliott Hughes <enh@google.com> Move the meat of <features.h> into <sys/cdefs.h>.

This way it's a lot harder for us to screw up (since we should always
be including <sys/cdefs.h> anyway).

Bug: 14659579
Change-Id: I23070fff3296b0d1c683bb5e3a6e214146327d53
b81046202842427a7e894a6bcb357971332997b0 19-Aug-2014 Elliott Hughes <enh@google.com> Fix _BSD_SOURCE/__USE_BSD.

Bug: 14659579
Change-Id: I80ec9584f054c02d1078828f6bca759c42bc1d4c
2cfb4e8e2e217ef0e4140dcbf9b3da809781158c 18-Aug-2014 Elliott Hughes <enh@google.com> Improve <sys/cdefs.h>.

Fix and use __RENAME (and lose ___RENAME --- two underscores should be
enough for anybody). This was the point of this change, because I want
to use __RENAME to support the two basename variants and the two
strerror_r variants.

Lose a bunch of macros that weren't being used.

Lose three dead files from the DNS code.

Change-Id: I3ef645c566b16a52217bc2e68c7d54b37c7c9522
f963da22ecc25c51971d802037736ae540321441 13-May-2014 Calin Juravle <calin@google.com> Undef private *_BODY defines after use

Bug: 14865741
Change-Id: I1398f7b3f64e3c94f2714cede5b61205dfa78a24
6b5559315d959347fcc01781669f771746cbb2ee 19-Feb-2014 Elliott Hughes <enh@google.com> Use uid_t and gid_t for st_uid and st_gid in struct stat.

Change-Id: Ide62dc714d76d881e3aa79e7a59ee6533a23dd00
db1ea3474899ebbd783aba872d3005f95a816d0f 18-Jan-2014 Elliott Hughes <enh@google.com> Implement some of the missing LFS64 support.

This gives us:

* <dirent.h>
struct dirent64
readdir64, readdir64_r, alphasort64, scandir64

* <fcntl.h>
creat64, openat64, open64.

* <sys/stat.h>
struct stat64
fstat64, fstatat64, lstat64, stat64.

* <sys/statvfs.h>
struct statvfs64
statvfs64, fstatvfs64.

* <sys/vfs.h>
struct statfs64
statfs64, fstatfs64.

This also removes some of the incorrect #define hacks we've had in the
past (for stat64, for example, which we promised to clean up way back
in bug 8472078).

Bug: 11865851
Bug: 8472078
Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
645d0312c2d6b6492cc4b3891bc1a91908dc24b7 06-Feb-2014 Chris Dearman <chris.dearman@imgtec.com> [MIPS64] libc/libm support

libc/libm support for MIPS64 targets

Change-Id: I8271941d418612a286be55495f0e95822f90004f
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com>
b8fa5b1ca9fc9b8b92875d2d9f33df3c8310aa09 20-Dec-2013 Elliott Hughes <enh@google.com> Fix struct stat for aarch64.

Another kernel, another struct stat.

Change-Id: Ia5ee553d4a2ffc878d2fed82a763ff64c02b12e8
f8fcfbc85a3ce3e195626b90736d3a484331494b 22-Oct-2013 Elliott Hughes <enh@google.com> Move away from the __ARCH_WANT_SYSCALL_NO_AT system calls.

Modern architectures only get the *at(2) system calls. For example,
aarch64 doesn't have open(2), and expects userspace to use openat(2)
instead.

Change-Id: I87b4ed79790cb8a80844f5544ac1a13fda26c7b5
594b1a4af204aa9de2b4913182f4556e38d71648 22-Oct-2013 Elliott Hughes <enh@google.com> Make sure we have a mkfifo symbol.

Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: Ic0a883a5f30beb82cb7be3c4e81b6d693d5fbb4d
f68fac8c0030e56dfaab60c5a3a7c3c5afca80cc 18-Dec-2012 Pavel Chupin <pavel.v.chupin@intel.com> x86_64: Fix sys/stat.h

Add 64-bit stat structure mapping 64-bit stat syscall.

Change-Id: Ice517616391bee1d556b6c03e7f5ee610050e6c6
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
840a114eb12773c5af39c0c97675b27aa6dee78c 09-Aug-2013 Elliott Hughes <enh@google.com> Add futimens.

(cherry picked from commit d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1)

Bug: 10239370
Change-Id: I0087e85a94d83b6ce68ec6a0768c44cbe4bd0132
d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1 09-Aug-2013 Elliott Hughes <enh@google.com> Add futimens.

Bug: 10239370
Change-Id: I518340084103dc339ef8a065d4837d6258a1381d
a6cde392765eb955cb4be5faa6ee62dcf77e8aa5 29-Jun-2013 Nick Kralevich <nnk@google.com> More FORTIFY_SOURCE functions under clang

* bzero
* umask
* strlcat

Change-Id: I65065208e0b8b37e10f6a266d5305de8fa9e59fc
a641c18f0c62c31f5678f8c159a74486010ea851 18-Jun-2013 Nick Kralevich <nnk@google.com> libc: Rename fortify error functions.

__umask_error -> __umask_invalid_mode
__creat_error -> __creat_missing_mode
__too_many_args_error -> __creat_too_many_args

Change-Id: I4036f344a3a93628e70f2e948ad73cfed3a967ea
16d1af167f8e36a9aa4a07ae77034ad519b00463 17-Jun-2013 Nick Kralevich <nnk@google.com> libc: add limited FORTIFY_SOURCE support for clang

In 829c089f83ddee37203b52bcb294867a9ae7bdbc, we disabled all
FORTIFY_SOURCE support when compiling under clang. At the time,
we didn't have proper test cases, and couldn't easily create targeted
clang tests.

This change re-enables FORTIFY_SOURCE support under clang for a
limited set of functions, where we have explicit unittests available.
The functions are:

* memcpy
* memmove
* strcpy
* strncpy
* strcat
* strncat
* memset
* strlen (with modifications)
* strchr (with modifications)
* strrchr (with modifications)

It may be possible, in the future, to enable other functions. However,
I need to write unittests first.

For strlen, strchr, and strrchr, clang unconditionally calls the
fortified version of the relevant function. If it doesn't know the
size of the buffer it's dealing with, it passes in ((size_t) -1),
which is the largest possible size_t.

I added two new clang specific unittest files, primarily copied
from fortify?_test.cpp.

I've also rebuild the entire system with these changes, and didn't
observe any obvious problems.

Change-Id: If12a15089bb0ffe93824b485290d05b14355fcaa
b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5 18-Jun-2013 Nick Kralevich <nnk@google.com> libc: Introduce __errordecl()

Define __errordecl and replace __attribute__((__error__("foo")))
with __errordecl. Make sure __errordecl is a no-op on clang, as it
generates a compile time warning.

Change-Id: Ifa1a2d3afd6881de9d479fc2adac6737871a2949
890c8ed6ef773160cd6840a92e0d469fe530871f 22-Mar-2013 Elliott Hughes <enh@google.com> Fix builds where _FORTIFY_SOURCE is off.

Also add a more intention-revealing guard so we don't have loads of
places checking whether our inlining macro is defined.

Change-Id: I168860cedcfc798b07a5145bc48a125700265e47
f27b7fb0567a9cbb642be9d98298cb6668e7db39 10-Oct-2012 Hakan Kvist <hakan.kvist@sonymobile.com> Define DEFFILEMODE and friends

Define the macros ACCESSPERMS, ALLPERMS and DEFFILEMODE.
These macros originates from BSD but has been available in glibc
for quite some time.

Change-Id: I429cd30aa4e73f53b153ee7740070cebba166c57
cd587701c8590fb34bb69804b5d3b3c14d3d2508 26-Sep-2012 Nick Kralevich <nnk@google.com> FORTIFY_SOURCE: add umask check

Verify that the call to umask makes sense. While this wouldn't
have detected bug 7094213 (because the low order bits were all zero),
it might detect other similar bugs.

References: https://code.google.com/p/android-source-browsing/source/detail?r=acba45cc4b1f98f67fcdeda2f7c13ed57659b92a&repo=platform--libcore

Change-Id: I966a531d6b3cf8e1c5eacd69bd3cbec475b5fa58
6437eac15a5b595ab26ef51834509c44695eb7e4 03-Aug-2012 Raghu Gandham <raghu@mips.com> MIPS support to sys/ headers

Change-Id: I32207a1d918e4842da341f6b242ae39c69a83b03
ae2d5ba31412c4f382ef405000baa866f35dd736 18-Mar-2011 Ken Sumrall <ksumrall@android.com> Add support for the utimensat(2) syscall to bionic.

The kernel has supported this syscall for quite some time now,
but bionic did not. Now that there is a need for it, let's
add it to bionic.

Change-Id: Ifcef3e46f1438d79435b600c4e6063857ab16903
09baf4e881c78e67c7849aa81432ceb34e72e913 22-Jun-2009 David 'Digit' Turner <digit@google.com> Add Glibc-compatible macro aliases for the nanosecond time accessors in stat structure
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
e5cc1f386b167b9f7bfdebc7219e89aa9b71e4b2 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution