diff options
author | Frans Kaashoek <[email protected]> | 2012-09-10 21:58:18 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2012-09-10 21:58:18 -0400 |
commit | c440b5cd972c61c4fb0504896beac79dc017afd8 (patch) | |
tree | 78c52d5560b8ba6ebeb852486534256d8a54e195 /mkfs.c | |
parent | cf57e525c14eb2a5f3dd9a16fd78de61ed76a974 (diff) | |
download | xv6-labs-c440b5cd972c61c4fb0504896beac79dc017afd8.tar.gz xv6-labs-c440b5cd972c61c4fb0504896beac79dc017afd8.tar.bz2 xv6-labs-c440b5cd972c61c4fb0504896beac79dc017afd8.zip |
Use static assert instead of _LP64 (thanks Eddie!)
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -11,9 +11,7 @@ #include "stat.h" #include "param.h" -#ifndef _LP64 -#error "Integers are not 32 bits" -#endif +#define static_assert(a, b) do { switch (0) case 0: case (a): ; } while (0) int nblocks = 985; int nlog = LOGSIZE; @@ -68,6 +66,9 @@ main(int argc, char *argv[]) char buf[512]; struct dinode din; + + static_assert(sizeof(int) == 4, "Integers must be 4 bytes!"); + if(argc < 2){ fprintf(stderr, "Usage: mkfs fs.img files...\n"); exit(1); |