>>74
mkdir had inline
too.
mkfifo assumes mode_t
is signed.dectooct
returns -1 if you give it a number that has the digits 8 or 9 in it. you store the int
result of dectooct
in the mode_t
variable mode
and then check to see if it's equal to -1 to determine whether the mode supplied by the user is valid:
if(mode == -1) {
fprintf(stderr, "%s: invalid mode\n", argv[0]);
return 1;
}
mode
cannot ever be -1 if mode_t
is unsigned (which it is on my system), so it continues on and tries to set the mode to 0177777.
also, mkfifo really needs to be indented.
As an aside, we're thinking of adding a "long long long" to AnonCC which, if the machine supports it, will be at least 128 bits.