Real disk devices should be block devices anyway.
One user reported the disksize check causing a
system reboot during vac of a tree with an "interesting"
device.
Fixes#103.
This brings mk's behavior when using rc in line with Plan 9's.
The existing code is for Unix environment data structures but
also was assuming Unix shell semantics where empty and missing
variables are mostly equivalent.
The Plan 9 code (/sys/src/cmd/mk/plan9.c in the distribution)
explicitly removes /env/name (creating an empty list) when the
value is missing or an empty string.
Fixes#255.
Improved error message in case of unexpected open flags. The message
unexpected open flags requested=0100040 unhandled=040
prompted me to clear the FMODE_EXEC flag, although I wonder if I
shouldn't have set OEXEC (0x3) instead.
Now that we only have Metal, we can drop the -metal.
Also now that Carbon is gone we can drop the macargv.c,
and then the -objc from object file names.
We didn't start using Metal until macOS 10.14,
but it was available on 10.13, which is currently
the oldest Apple-supported version of macOS.
Simplify by deleting the old code.
The functions from <ctype.h> require that their argument be
representable as an unsigned char, anything else is an error.
Change-Id: I9dafc49c431b7a2550b041603f27bac3c0010eea
Some truetype fonts have good manual hinting.
Ignoring hinting makes the font render badly on low resolution screens.
This commit only disables the freetype autohinter, and allows hinting.
This splits a certain vtmallocz call in mkihash into two vtmallocz
calls. The first issue this fixes is that the C aliasing rules were not
respected in the code before this commit. The other thing is that this
enables better memory alignment guarantees.
Updates #313
Change-Id: Ia4f3e0fc85facc778193f5e977d4f99a1a9abd23
For pthread systems that are fussy about which stack is used,
this makes sure that threadmain runs on a system stack.
If you only use proccreate (never threadcreate), all threads run
on system stacks.
Under certain conditions it looks like frexp gets #defined
to something else on macOS during system headers,
which then breaks the declaration in libc.h.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.
Signed-off-by: Dan Cross <cross@gajendra.net>
In general, no space after `if` etc, and no
braces for a single statement inside of a loop
or conditional.
Signed-off-by: Dan Cross <cross@gajendra.net>
A loop is added for each structure field instead of accessing the other
fields through the first one in one loop.
Updates #313
Change-Id: I0e27e15feacb77391bc1decee7cf720d64d14586
POSIX does not support grouping in case item patterns.
Installing with a strict POSIX shell fails with:
/usr/local/plan9/bin/9c: line 82: syntax error near unexpected token `('
/usr/local/plan9/bin/9c: line 82: `*(DragonFly|BSD)*gcc*) usegcc ;;'
This change expands the patterns to work around the limitation.
See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10
(and search for case_clause)
GCC pointed this out with some "warning: ‘strncpy’ specified bound NUM
equals destination size [-Wstringop-truncation]" warnings.
Change-Id: Id8408b165f6e4ae82c96a77599d89f658d979b32