Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: include/features.h

Issue 6026005: Fix __fxstat which is called from fstat. Remove obsolete fstat64. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-glibc.git@master
Patch Set: fixing comments, spacing and some other minor stuff. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bits/typesizes.h ('k') | io/sys/stat.h » ('j') | sysdeps/nacl/fxstat.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/features.h
diff --git a/include/features.h b/include/features.h
index 3a44e38a2c2e650afb22605615789a51537173bc..e044032bb160988ca238d3a16416d7a2dcb4a29d 100644
--- a/include/features.h
+++ b/include/features.h
@@ -113,6 +113,18 @@
#undef __FAVOR_BSD
#undef __KERNEL_STRICT_NAMES
+/* Set _FILE_OFFSET_BITS to 64 for user programs and produce an error if it
+ set to other value. */
+#ifdef __native_client__
+# ifndef _LIBC
+# ifndef _FILE_OFFSET_BITS
+# define _FILE_OFFSET_BITS 64
+# elif _FILE_OFFSET_BITS != 64
+# error "native client requires _FILE_OFFSET_BITS == 64"
+# endif
+# endif
+#endif
+
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
#ifndef _LOOSE_KERNEL_NAMES
@@ -250,7 +262,11 @@
#endif
#ifdef _LARGEFILE64_SOURCE
-# define __USE_LARGEFILE64 1
+/* Native client applications shouldn't use functions with 64 suffix.
+ Unfortunately, we can't make glibc itself to live without them. */
+# if !defined __native_client__ || defined _LIBC
+# define __USE_LARGEFILE64 1
+# endif
#endif
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
« no previous file with comments | « bits/typesizes.h ('k') | io/sys/stat.h » ('j') | sysdeps/nacl/fxstat.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698