- removed comment
Autodetection for strdup prototype fails
Cactus has autoconf code to detect whether there is a prototype for strdup. This autoconf code fails with icc, as icc never aborts when there are conflicting prototypes. There is a warning only.
I have disabled the respective autoconf macro and have commented out the respective lines in configure.in. This code should either be corrected or removed.
Keyword:
Comments (7)
-
reporter -
- removed comment
already fixed (in more or less that way). The code now does:
char *p = (char*)strdup;
which is what autoconf 2.59's
AC_CHECK_DECL
does. -
- removed comment
So, this can be marked as 'fixed' now?
-
- changed status to resolved
- removed comment
it no longer fails using either icc or gcc (tested on Datura and Debian). The test uses a method copied from autoconf 2.59. There is a leftover TODO which I am not sure I really would want to implement right now in that it just adds a new name for the same test. Currently configure output is a bit untidy in that it appears to check for strdup twice when in fact the first test checks for strdup in C and the second in C++.
-
reporter - removed comment
The TODO would make things easier to use since the user doesn't explicitly have to switch between C and C++ and back.
-
- removed comment
Implemented in git hash 99ca49b114c04fff85bc7900c959c90ca8840808 of the flesh, CPPFLAGS restored in 5ccd6051c6f68275d007922ac0d31a58460e94d6 of the flesh.
-
- edited description
- changed status to closed
- Log in to comment
Here is how to detect whether strdup has a prototype:
This will fail unless strdup has a prototype.