mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Fix implicit declaration of library function exit in configure script which led to build failure with Xcode 12. Modify configure script to write a minimal config.log so that future configure test failures are easier to notice and diagnose. Closes: https://trac.macports.org/ticket/61558 Use MacPorts CFLAGS, CPPFLAGS, and LDFLAGS when running configure tests. Also use MacPorts CPPFLAGS when building. Rename some patchfiles.
74 lines
2.1 KiB
Diff
74 lines
2.1 KiB
Diff
Fix:
|
|
|
|
error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
|
|
|
|
error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
|
|
--- configure.orig 2020-12-20 06:03:47.000000000 -0600
|
|
+++ configure 2020-12-20 06:07:49.000000000 -0600
|
|
@@ -238,6 +238,7 @@
|
|
|
|
echo checking for sys/termios.h
|
|
echo "#include <sys/termios.h>
|
|
+#include <stdlib.h>
|
|
main() { exit(0); }" > conftest.c
|
|
eval $compile
|
|
if test -s conftest && ./conftest 2>/dev/null; then
|
|
@@ -247,6 +248,7 @@
|
|
|
|
echo checking for POSIX.1 header files
|
|
echo "#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
main() {
|
|
#ifdef _POSIX_VERSION
|
|
exit(0);
|
|
@@ -262,6 +264,7 @@
|
|
|
|
echo checking for BSD string and memory functions
|
|
echo "#include <strings.h>
|
|
+#include <stdlib.h>
|
|
main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
|
|
eval $compile
|
|
if test -s conftest && ./conftest 2>/dev/null; then :
|
|
@@ -271,6 +274,7 @@
|
|
|
|
echo checking whether sys/types.h defines uid_t
|
|
echo '#include <sys/types.h>
|
|
+#include <stdlib.h>
|
|
main() { uid_t x; exit(0); }' > conftest.c
|
|
eval $compile
|
|
if test -s conftest && ./conftest 2>/dev/null; then :
|
|
@@ -291,6 +295,7 @@
|
|
|
|
echo checking how to get alloca
|
|
echo '
|
|
+#include <stdlib.h>
|
|
#ifdef __GNUC__
|
|
#define alloca __builtin_alloca
|
|
#else
|
|
@@ -316,6 +321,7 @@
|
|
if [ $usenls = true ]; then
|
|
echo checking for nls
|
|
echo '#include <nl_types.h>
|
|
+ #include <stdlib.h>
|
|
main() {nl_catd catfd; exit(0); }' > conftest.c
|
|
eval $compile
|
|
if test -s conftest && ./conftest 2>/dev/null; then :
|
|
@@ -333,6 +339,7 @@
|
|
echo '#define _GNU_SOURCE
|
|
#include <getopt.h>
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
struct option long_opts[] = { { "", no_argument, NULL, 0 } };
|
|
main() { exit(0); }' > conftest.c
|
|
eval $compile
|
|
--- src/makemsg.c.orig 2006-08-02 13:11:44.000000000 -0500
|
|
+++ src/makemsg.c 2020-11-14 09:51:34.000000000 -0600
|
|
@@ -19,6 +19,7 @@
|
|
*/
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h>
|
|
#include <unistd.h>
|
|
#ifdef __QNX__
|
|
#include <unix.h>
|