mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long
to simplify the large file check in many place Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
d2d954f691
commit
92b2f1bd3d
+1
-1
@@ -149,7 +149,7 @@
|
||||
#define MFD_HUGE_2GB (31 << MFD_HUGE_SHIFT)
|
||||
#define MFD_HUGE_16GB (34 << MFD_HUGE_SHIFT)
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define mmap64 mmap
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#define RLIMIT_STACK 6 /* Limit on stack size */
|
||||
#define RLIMIT_AS 7 /* Limit on address space size */
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define RLIM_INFINITY UINT64_MAX /* No limit */
|
||||
# define RLIM_SAVED_MAX UINT64_MAX /* Unrepresentable saved hard limit */
|
||||
# define RLIM_SAVED_CUR UINT64_MAX /* Unrepresentable saved soft limit */
|
||||
@@ -95,7 +95,7 @@
|
||||
* It must be an unsigned integral type.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
typedef uint64_t rlim_t;
|
||||
#else
|
||||
typedef uint32_t rlim_t;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
# define CONFIG_SENDFILE_BUFSIZE 512
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define sendfile64 sendfile
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@
|
||||
#define st_ctime st_ctim.tv_sec
|
||||
#define st_mtime st_mtim.tv_sec
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define stat64 stat
|
||||
# define fstat64 fstat
|
||||
# define lstat64 lstat
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
#define CROMFS_MAGIC 0x4d4f5243
|
||||
#define RPMSGFS_MAGIC 0x54534f47
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define statfs64 statfs
|
||||
# define fstatfs64 fstatfs
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define ST_RDONLY 0x0001 /* Mount read-only. */
|
||||
#define ST_NOSUID 0x0002 /* Ignore suid and sgid bits. */
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define statvfs64 statvfs
|
||||
# define fstatvfs64 fstatvfs
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@
|
||||
#define SCHED_PRIORITY_MIN 1
|
||||
#define SCHED_PRIORITY_IDLE 0
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define fsblkcnt64_t fsblkcnt_t
|
||||
# define fsfilcnt64_t fsfilcnt_t
|
||||
# define blkcnt64_t blkcnt_t
|
||||
@@ -193,7 +193,7 @@ typedef int wint_t;
|
||||
|
||||
typedef int wctype_t;
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
/* Large file versions */
|
||||
|
||||
typedef uint64_t fsblkcnt_t;
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
|
||||
#if defined(CONFIG_FS_LARGEFILE)
|
||||
# define preadv64 preadv
|
||||
# define pwritev64 pwritev
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user