* FS shell: Use 64 bit [s]size_t on 64 bit platforms.
* SupportDefs.h (build platform): Define [s]size_t printf() macros correctly on 64 bit hosts. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36929 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
386be45abc
commit
a9139aa356
@ -107,25 +107,29 @@ typedef uint32 perform_code;
|
||||
|
||||
|
||||
/* printf() format strings for some standard types */
|
||||
/* size_t */
|
||||
#define B_PRIuSIZE B_PRIu32
|
||||
#define B_PRIoSIZE B_PRIo32
|
||||
#define B_PRIxSIZE B_PRIx32
|
||||
#define B_PRIXSIZE B_PRIX32
|
||||
/* ssize_t */
|
||||
#define B_PRIdSSIZE B_PRId32
|
||||
#define B_PRIiSSIZE B_PRIi32
|
||||
/* addr_t */
|
||||
/* addr_t, size_t, ssize_t */
|
||||
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||
# define B_PRIuADDR B_PRIu64
|
||||
# define B_PRIoADDR B_PRIo64
|
||||
# define B_PRIxADDR B_PRIx64
|
||||
# define B_PRIXADDR B_PRIX64
|
||||
# define B_PRIuSIZE B_PRIu64
|
||||
# define B_PRIoSIZE B_PRIo64
|
||||
# define B_PRIxSIZE B_PRIx64
|
||||
# define B_PRIXSIZE B_PRIX64
|
||||
# define B_PRIdSSIZE B_PRId64
|
||||
# define B_PRIiSSIZE B_PRIi64
|
||||
#else
|
||||
# define B_PRIuADDR B_PRIu32
|
||||
# define B_PRIoADDR B_PRIo32
|
||||
# define B_PRIxADDR B_PRIx32
|
||||
# define B_PRIXADDR B_PRIX32
|
||||
# define B_PRIuSIZE B_PRIu32
|
||||
# define B_PRIoSIZE B_PRIo32
|
||||
# define B_PRIxSIZE B_PRIx32
|
||||
# define B_PRIXSIZE B_PRIX32
|
||||
# define B_PRIdSSIZE B_PRId32
|
||||
# define B_PRIiSSIZE B_PRIi32
|
||||
#endif
|
||||
/* phys_addr_t */
|
||||
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||
|
@ -15,16 +15,18 @@ typedef volatile int64_t vint64_t;
|
||||
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||
typedef uint64_t fssh_addr_t;
|
||||
typedef uint64_t fssh_phys_addr_t;
|
||||
typedef uint64_t fssh_size_t;
|
||||
typedef int64_t fssh_ssize_t;
|
||||
#else
|
||||
typedef uint32_t fssh_addr_t;
|
||||
typedef uint32_t fssh_phys_addr_t;
|
||||
typedef uint32_t fssh_size_t;
|
||||
typedef int32_t fssh_ssize_t;
|
||||
#endif
|
||||
|
||||
typedef int32_t fssh_dev_t;
|
||||
typedef int64_t fssh_ino_t;
|
||||
|
||||
typedef uint32_t fssh_size_t;
|
||||
typedef int32_t fssh_ssize_t;
|
||||
typedef int64_t fssh_off_t;
|
||||
|
||||
typedef int64_t fssh_bigtime_t;
|
||||
@ -95,25 +97,29 @@ typedef int32_t fssh_pid_t;
|
||||
|
||||
|
||||
/* printf() format strings for some standard types */
|
||||
/* size_t */
|
||||
#define FSSH_B_PRIuSIZE FSSH_B_PRIu32
|
||||
#define FSSH_B_PRIoSIZE FSSH_B_PRIo32
|
||||
#define FSSH_B_PRIxSIZE FSSH_B_PRIx32
|
||||
#define FSSH_B_PRIXSIZE FSSH_B_PRIX32
|
||||
/* ssize_t */
|
||||
#define FSSH_B_PRIdSSIZE FSSH_B_PRId32
|
||||
#define FSSH_B_PRIiSSIZE FSSH_B_PRIi32
|
||||
/* addr_t */
|
||||
/* addr_t, size_t, ssize_t */
|
||||
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||
# define FSSH_B_PRIuADDR FSSH_B_PRIu64
|
||||
# define FSSH_B_PRIoADDR FSSH_B_PRIo64
|
||||
# define FSSH_B_PRIxADDR FSSH_B_PRIx64
|
||||
# define FSSH_B_PRIXADDR FSSH_B_PRIX64
|
||||
# define FSSH_B_PRIuSIZE FSSH_B_PRIu64
|
||||
# define FSSH_B_PRIoSIZE FSSH_B_PRIo64
|
||||
# define FSSH_B_PRIxSIZE FSSH_B_PRIx64
|
||||
# define FSSH_B_PRIXSIZE FSSH_B_PRIX64
|
||||
# define FSSH_B_PRIdSSIZE FSSH_B_PRId64
|
||||
# define FSSH_B_PRIiSSIZE FSSH_B_PRIi64
|
||||
#else
|
||||
# define FSSH_B_PRIuADDR FSSH_B_PRIu32
|
||||
# define FSSH_B_PRIoADDR FSSH_B_PRIo32
|
||||
# define FSSH_B_PRIxADDR FSSH_B_PRIx32
|
||||
# define FSSH_B_PRIXADDR FSSH_B_PRIX32
|
||||
# define FSSH_B_PRIuSIZE FSSH_B_PRIu32
|
||||
# define FSSH_B_PRIoSIZE FSSH_B_PRIo32
|
||||
# define FSSH_B_PRIxSIZE FSSH_B_PRIx32
|
||||
# define FSSH_B_PRIXSIZE FSSH_B_PRIX32
|
||||
# define FSSH_B_PRIdSSIZE FSSH_B_PRId32
|
||||
# define FSSH_B_PRIiSSIZE FSSH_B_PRIi32
|
||||
#endif
|
||||
/* phys_addr_t */
|
||||
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||
@ -142,8 +148,13 @@ typedef int32_t fssh_pid_t;
|
||||
|
||||
|
||||
/* limits */
|
||||
#define FSSH_SIZE_MAX UINT32_MAX
|
||||
#define FSSH_SSIZE_MAX INT32_MAX
|
||||
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||
# define FSSH_SIZE_MAX UINT64_MAX
|
||||
# define FSSH_SSIZE_MAX INT64_MAX
|
||||
#else
|
||||
# define FSSH_SIZE_MAX UINT32_MAX
|
||||
# define FSSH_SSIZE_MAX INT32_MAX
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _FSSH_TYPES_H
|
||||
|
Loading…
Reference in New Issue
Block a user