FreeCalypso > hg > freecalypso-tools
view Source-dirs @ 465:003e48f8ebe1
rvinterf/etmsync/fsnew.c: cast 0 to (char *) for execl sentinel
I generally don't use NULL and use plain 0 instead, based on a "NULL
considered harmful" discussion on the classiccmp mailing list many aeons
ago (I couldn't find it, and I reason that it must have been 2005 or
earlier), but a recent complaint by a packager sent me searching, and I
found this:
https://ewontfix.com/11/
While I don't give a @#$% about "modern" systems and code-nazi tools,
I realized that passing a plain 0 as a pointer sentinel in execl is wrong
because it will break on systems where pointers are longer than the plain
int type. Again, I don't give a @#$% about the abomination of x86_64 and
the like, but if anyone ever manages to port my code to something like a
PDP-11 (16-bit int, 32-bit long and pointers), then passing a plain 0
as a function argument where a pointer is expected most definitely won't
work: if the most natural stack slot and SP alignment unit is 16 bits,
fitting an int, with longs and pointers taking up two such slots, then
the call stack will be totally wrong with a plain 0 passed for a pointer.
Casting the 0 to (char *) ought to be the most kosher solution for the
most retro systems possible.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Feb 2019 00:00:19 +0000 |
parents | 3ec8ef8b2d37 |
children | 026df5681bd3 |
line wrap: on
line source
ffstools This directory subtree was originally created to hold the source for our TIFFS In Vitro Analyzer tool, but has since been extended to contain various tools that perform static (or "in vitro") transformations on various bits of data that go into the flash file system on our FreeCalypso GSM devices or are contained in other vendors' flash data structures. librftab A library for reading and writing RF parameter tables in our FreeCalypso ASCII format - see doc/RF_tables. libserial All of our host programs that operate on serial ports (the way in which we communicate with GSM device targets) go through libserial, i.e., our serial port handling code has been factored out into a common library. loadtools fc-loadtool, fc-iram, fc-xram and fc-compalram form the part of FC host tools called loadtools, which used to be its own package. fc-buzplay is also built in the loadtools suite because it uses many of the same components. miscutil A few miscellaneous utilities are built here. ringtools Tools for working with ringtone melodies are built here. rvinterf Everything dealing with the RVTMUX interface to running GSM firmwares and everything based on the rvinterf framework is built under rvinterf. The tfc139 utility, which logically belongs with loadtools, is built in the rvinterf subtree because it is built from mostly the same source components as rvtdump and rvinterf. target-utils The source for loadagent and compalstage lives here, along with a few extra target utilities that are of interest only to developers. toolchain Scripts and patches for building the gcc+binutils toolchain targeting ARM7, the CPU core of the Calypso GSM/GPRS baseband processor. You'll need to build and install this toolchain first before you can build target-utils. uptools The User Phone Tools suite is built here - see doc/User-phone-tools.