Skip to content
Snippets Groups Projects
Commit c440b5cd authored by Frans Kaashoek's avatar Frans Kaashoek
Browse files

Use static assert instead of _LP64 (thanks Eddie!)

parent cf57e525
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment