-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mamake: fix whitespace, fix a warning, add full backward compat
src/cmd/INIT/mamake.c: - delimiter() macro: Make whitespace check consistent with the rest by using isspace(). (re: abbd9ff, 6cc2f6a) - Silence a warning that some GCC versions throw about strcpy into a region of size 1. This is due to the classic C89/C90 'struct hack' from before flexible arrays in structs were standardised: http://web.archive.org/web/20240108080600/c-faq.com/struct/structhack.html If we're compiling C99 or up, use flexible array struct members in Dict_item_t and View_t. In search(), the allocation of Dict_item_t items now needs to add a byte to strlen(name) because the flexible array is not counted in sizeof(Dict_item_t). Note that the allocation of View_t items in view() was already counting an extra byte, thus was wasting one until now. In C89/90, both will now waste a byte; not worth the effort to fix. - rule(): Unless strict mode is on, make dependencies on source *.lic files (the removed proto(1) licence atrocities) optional by assigning the dontcare attribute. This was the only thing standing in the way of full backward compatibility with old Mamfiles. (re: 594f309)
- Loading branch information
Showing
1 changed file
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters