- changed title to Retire snprintf.c
- removed comment
Retire snprintf.c
C99 provides snprintf, and we assume at least C99 support in Cactus. Cactus does not need to provide snprintf any more.
Keyword:
Comments (11)
-
reporter -
- removed comment
"approved" as being ok on the ET call today.
-
reporter - changed status to resolved
- removed comment
Done.
-
- changed status to open
- removed comment
When retiring snprintf, the related function strdup was also retired. However strdup is not in C99 but in BSD/POSIX and thus is not available by default. In C it is implicitly declared to return int which fails if the actual returned pointer is larger than 32 bits. The branch
https://bitbucket.org/cactuscode/cactus/branch/rhaas%2Fcheck-for-PI-and-strdup
provides configure checks for this routine.
-
- changed status to open
- removed comment
-
reporter - removed comment
Regarding
strdup
: Ouch. Hello 1972, nice to meet you.Isn't there a gcc warning that requires prototypes for all functions? I think we should be able to enable this safely.
-
- removed comment
There is a gcc warning that one can use for prototypes, however it warns about many benign uses of say
printf
without prototype. It is also only a warning and I would not want to have to rely on it (or only on its error-ized version from -Werror) to prevent subtle errors (since the wrong prototyped one will work as long as the returned address is less than 2GB) since we have very many other warnings that are triggered when compiling the full set of thorns. -
- removed comment
Anyone care to review this?
-
reporter - changed status to open
- removed comment
-
- changed status to resolved
- removed comment
Applied in git hash 898d23d08a833aa9ebb6c9690765aaa4d6afc436 of the flesh.
-
- changed status to closed
- edited description
- Log in to comment