mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
printf-sanity-20090318
LICENSE IPL10 make it work for Windows
This commit is contained in:
parent
85d8bdac74
commit
be4d4076f2
@ -276,17 +276,6 @@ typedef struct afsUUID afsUUID;
|
||||
#define AFS_DEMAND_ATTACH_FS 1
|
||||
#endif
|
||||
|
||||
#ifdef AFS_HPUX_ENV
|
||||
#define static_inline static __inline
|
||||
#define hdr_static_inline static __inline
|
||||
#elif defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
|
||||
#define static_inline static
|
||||
#define hdr_static_inline
|
||||
#else
|
||||
#define static_inline static inline
|
||||
#define hdr_static_inline static inline
|
||||
#endif
|
||||
|
||||
/* A macro that can be used when printf'ing 64 bit integers, as Unix and
|
||||
* windows use a different format string
|
||||
*/
|
||||
@ -299,8 +288,29 @@ typedef struct afsUUID afsUUID;
|
||||
/* Functions to safely cast afs_int32 and afs_uint32 so they can be used in
|
||||
* printf statemements with %ld and %lu
|
||||
*/
|
||||
#ifdef AFS_NT40_ENV
|
||||
#define static_inline __inline static
|
||||
|
||||
hdr_static_inline long int afs_cast_int32(afs_int32 d) { return (long int) d; }
|
||||
hdr_static_inline unsigned long int afs_cast_uint32(afs_uint32 d) { return (unsigned long int) d; }
|
||||
#ifdef AFS_64BIT_ENV
|
||||
static_inline afs_int64 afs_cast_int32(afs_int32 d) { return (afs_int64) d; }
|
||||
static_inline afs_uint64 afs_cast_uint32(afs_uint32 d) { return (afs_uint64) d; }
|
||||
#else
|
||||
static_inline long long afs_cast_int32(afs_int32 d) { return (long long) d; }
|
||||
static_inline unsigned long long afs_cast_uint32(afs_uint32 d) { return (unsigned long long) d; }
|
||||
#endif
|
||||
#else /* AFS_NT40_ENV */
|
||||
#ifdef AFS_HPUX_ENV
|
||||
#define static_inline static __inline
|
||||
#define hdr_static_inline static __inline
|
||||
#elif defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
|
||||
#define static_inline static
|
||||
#define hdr_static_inline
|
||||
#else
|
||||
#define static_inline static inline
|
||||
#define hdr_static_inline static inline
|
||||
#endif
|
||||
hdr_static_inline long long afs_cast_int32(afs_int32 d) { return (long long) d; }
|
||||
hdr_static_inline unsigned long long afs_cast_uint32(afs_uint32 d) { return (unsigned long long) d; }
|
||||
#endif /* AFS_NT40_ENV */
|
||||
|
||||
#endif /* OPENAFS_CONFIG_AFS_STDS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user