diff options
Diffstat (limited to 'lib/ext2fs')
-rw-r--r-- | lib/ext2fs/ChangeLog | 16 | ||||
-rw-r--r-- | lib/ext2fs/ext2_ext_attr.h | 2 | ||||
-rw-r--r-- | lib/ext2fs/ext2_types.h.in | 14 | ||||
-rw-r--r-- | lib/ext2fs/flushb.c | 8 | ||||
-rw-r--r-- | lib/ext2fs/ismounted.c | 2 | ||||
-rw-r--r-- | lib/ext2fs/kernel-jbd.h | 8 |
6 files changed, 40 insertions, 10 deletions
diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 2a1bce25..45fc6bc7 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,19 @@ +2003-03-06 Theodore Tso <tytso@mit.edu> + + * ext2_types.h.in: Don't redefine types if other e2fsprogs + *_types.h files have been included already. + + * kernel-jbd.h: Use C99 variadic cpp macros if not using GCC. + (Older GCC's don't support the C99 variadic macros.) + + * flushb.c (ext2fs_sync_device), + ismounted.c (ext2fs_check_mount_point): Avoid GCC extension: + #warning not supported by Solaris suncc + + * ext2_ext_attr.h: Avoid GCC extension: 0 length arrays in + structure definition. Not needed for now in + ext2_ext_attr_entry. + 2003-01-25 Theodore Ts'o <tytso@mit.edu> * dirhash.c: Fix gcc -Wall nits. diff --git a/lib/ext2fs/ext2_ext_attr.h b/lib/ext2fs/ext2_ext_attr.h index 7fff2669..d0a44f3f 100644 --- a/lib/ext2fs/ext2_ext_attr.h +++ b/lib/ext2fs/ext2_ext_attr.h @@ -28,7 +28,9 @@ struct ext2_ext_attr_entry { __u32 e_value_block; /* disk block attribute is stored on (n/i) */ __u32 e_value_size; /* size of attribute value */ __u32 e_hash; /* hash value of name and value */ +#if 0 char e_name[0]; /* attribute name */ +#endif }; #define EXT2_EXT_ATTR_PAD_BITS 2 diff --git a/lib/ext2fs/ext2_types.h.in b/lib/ext2fs/ext2_types.h.in index 38f588f8..1d82c5d2 100644 --- a/lib/ext2fs/ext2_types.h.in +++ b/lib/ext2fs/ext2_types.h.in @@ -1,11 +1,11 @@ -#ifndef _EXT2_TYPES_H -#define _EXT2_TYPES_H - /* * If linux/types.h is already been included, assume it has defined - * everything we need. (cross fingers) + * everything we need. (cross fingers) Other header files may have + * also defined the types that we need. */ -#ifndef _LINUX_TYPES_H +#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ + !defined(_UUID_TYPES) && !defined(_EXT2_TYPES_H)) +#define _EXT2_TYPES_H typedef unsigned char __u8; typedef signed char __s8; @@ -48,6 +48,4 @@ typedef unsigned short __u32; ?== error: undefined 32 bit type #endif -#endif /* LINUX_TYPES_H */ - -#endif /* EXT2_TYPES_H */ +#endif /* _*_TYPES_H */ diff --git a/lib/ext2fs/flushb.c b/lib/ext2fs/flushb.c index ed4d3901..80a21179 100644 --- a/lib/ext2fs/flushb.c +++ b/lib/ext2fs/flushb.c @@ -65,12 +65,16 @@ errcode_t ext2fs_sync_device(int fd, int flushb) if (ioctl (fd, BLKFLSBUF, 0) == 0) return 0; #else - #warning BLKFLSBUF not defined + #ifdef __GNUC__ + #warning BLKFLSBUF not defined + #endif #endif #ifdef FDFLUSH ioctl (fd, FDFLUSH, 0); /* In case this is a floppy */ #else - #warning FDFLUSH not defined + #ifdef __GNUC__ + #warning FDFLUSH not defined + #endif #endif } return 0; diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c index 3552a1b7..26e80545 100644 --- a/lib/ext2fs/ismounted.c +++ b/lib/ext2fs/ismounted.c @@ -296,7 +296,9 @@ errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags, #ifdef HAVE_GETMNTINFO return check_getmntinfo(device, mount_flags, mtpt, mtlen); #else +#ifdef __GNUC__ #warning "Can't use getmntent or getmntinfo to check for mounted filesystems!" +#endif *mount_flags = 0; return 0; #endif /* HAVE_GETMNTINFO */ diff --git a/lib/ext2fs/kernel-jbd.h b/lib/ext2fs/kernel-jbd.h index 42803466..4d97b7f9 100644 --- a/lib/ext2fs/kernel-jbd.h +++ b/lib/ext2fs/kernel-jbd.h @@ -30,6 +30,10 @@ #include <asm/semaphore.h> #endif +#ifndef __GNUC__ +#define __FUNCTION__ "" +#endif + #define journal_oom_retry 1 #ifdef __STDC__ @@ -51,7 +55,11 @@ extern int journal_enable_debug; } \ } while (0) #else +#ifdef __GNUC__ #define jbd_debug(f, a...) /**/ +#else +#define jbd_debug(f, ...) /**/ +#endif #endif #else #define jbd_debug(x) /* AIX doesn't do STDC */ |