diff options
author | Russ Cox <rsc@swtch.com> | 2020-05-18 22:29:00 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-05-18 22:35:17 -0400 |
commit | 079f5e94459fe5afccf749764d81ab88c59f055a (patch) | |
tree | d5a5e403a7306395a125649c67e2c966c9b1fac1 /src/libdiskfs | |
parent | d4a4b66a401d8988441dd663bf1664e11c045797 (diff) | |
download | plan9port-079f5e94459fe5afccf749764d81ab88c59f055a.tar.gz plan9port-079f5e94459fe5afccf749764d81ab88c59f055a.tar.bz2 plan9port-079f5e94459fe5afccf749764d81ab88c59f055a.zip |
libdiskfs: avoid problematic internal constant names
AIX defines some of these constants in its C header files.
Diffstat (limited to 'src/libdiskfs')
-rw-r--r-- | src/libdiskfs/ext2.h | 33 | ||||
-rw-r--r-- | src/libdiskfs/ffs.h | 33 |
2 files changed, 66 insertions, 0 deletions
diff --git a/src/libdiskfs/ext2.h b/src/libdiskfs/ext2.h index f4c32ce3..bf98a9ac 100644 --- a/src/libdiskfs/ext2.h +++ b/src/libdiskfs/ext2.h @@ -27,6 +27,39 @@ enum NAMELEN = 255, + /* some systems have these defined */ + #undef IEXEC + #undef IWRITE + #undef IREAD + #undef ISVTX + #undef ISGID + #undef ISUID + #undef IFMT + #undef IFIFO + #undef IFCHR + #undef IFDIR + #undef IFBLK + #undef IFREG + #undef IFLNK + #undef IFSOCK + #undef IFWHT + + #define IEXEC EXT2_IEXEC + #define IWRITE EXT2_IWRITE + #define IREAD EXT2_IREAD + #define ISVTX EXT2_ISVTX + #define ISGID EXT2_ISGID + #define ISUID EXT2_ISUID + #define IFMT EXT2_IFMT + #define IFIFO EXT2_IFIFO + #define IFCHR EXT2_IFCHR + #define IFDIR EXT2_IFDIR + #define IFBLK EXT2_IFBLK + #define IFREG EXT2_IFREG + #define IFLNK EXT2_IFLNK + #define IFSOCK EXT2_IFSOCK + #define IFWHT EXT2_IFWHT + /* permissions in Inode.mode */ IEXEC = 00100, IWRITE = 0200, diff --git a/src/libdiskfs/ffs.h b/src/libdiskfs/ffs.h index d7881f15..b8675448 100644 --- a/src/libdiskfs/ffs.h +++ b/src/libdiskfs/ffs.h @@ -72,6 +72,39 @@ enum NDADDR = 12, NIADDR = 3, + /* some systems have these defined */ + #undef IEXEC + #undef IWRITE + #undef IREAD + #undef ISVTX + #undef ISGID + #undef ISUID + #undef IFMT + #undef IFIFO + #undef IFCHR + #undef IFDIR + #undef IFBLK + #undef IFREG + #undef IFLNK + #undef IFSOCK + #undef IFWHT + + #define IEXEC FFS_IEXEC + #define IWRITE FFS_IWRITE + #define IREAD FFS_IREAD + #define ISVTX FFS_ISVTX + #define ISGID FFS_ISGID + #define ISUID FFS_ISUID + #define IFMT FFS_IFMT + #define IFIFO FFS_IFIFO + #define IFCHR FFS_IFCHR + #define IFDIR FFS_IFDIR + #define IFBLK FFS_IFBLK + #define IFREG FFS_IFREG + #define IFLNK FFS_IFLNK + #define IFSOCK FFS_IFSOCK + #define IFWHT FFS_IFWHT + /* permissions in Inode.mode */ IEXEC = 00100, IWRITE = 0200, |