mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Closes: https://trac.macports.org/ticket/69795 Use -std=gnu89 because the code uses old K&R-style declarations.
168 lines
3.2 KiB
Diff
168 lines
3.2 KiB
Diff
Fix:
|
|
|
|
error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
|
|
|
|
Based on:
|
|
|
|
https://src.fedoraproject.org/rpms/t1lib/blob/rawhide/f/t1lib-configure-c99.patch
|
|
--- configure.orig 2007-12-23 09:49:43.000000000 -0600
|
|
+++ configure 2024-06-14 16:06:22.000000000 -0500
|
|
@@ -2888,7 +2888,7 @@
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
(exit $ac_status); }; }; then
|
|
for ac_declaration in \
|
|
- '' \
|
|
+ '#include <stdlib.h>' \
|
|
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
|
'extern "C" void std::exit (int); using std::exit;' \
|
|
'extern "C" void exit (int) throw ();' \
|
|
@@ -5787,8 +5787,8 @@
|
|
for (i = 0; i < 256; i++)
|
|
if (XOR (islower (i), ISLOWER (i))
|
|
|| toupper (i) != TOUPPER (i))
|
|
- exit(2);
|
|
- exit (0);
|
|
+ return 2;
|
|
+ return 0;
|
|
}
|
|
_ACEOF
|
|
rm -f conftest$ac_exeext
|
|
@@ -6291,7 +6291,7 @@
|
|
fi
|
|
fi
|
|
for ac_declaration in \
|
|
- '' \
|
|
+ '#include <stdlib.h>' \
|
|
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
|
'extern "C" void std::exit (int); using std::exit;' \
|
|
'extern "C" void exit (int) throw ();' \
|
|
@@ -10322,10 +10322,6 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __cplusplus
|
|
-extern "C" void exit (int);
|
|
-#endif
|
|
-
|
|
void fnord() { int i=42;}
|
|
int main ()
|
|
{
|
|
@@ -10339,7 +10335,7 @@
|
|
/* dlclose (self); */
|
|
}
|
|
|
|
- exit (status);
|
|
+ return status;
|
|
}
|
|
EOF
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
@@ -10420,10 +10416,6 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __cplusplus
|
|
-extern "C" void exit (int);
|
|
-#endif
|
|
-
|
|
void fnord() { int i=42;}
|
|
int main ()
|
|
{
|
|
@@ -10437,7 +10429,7 @@
|
|
/* dlclose (self); */
|
|
}
|
|
|
|
- exit (status);
|
|
+ return status;
|
|
}
|
|
EOF
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
@@ -14038,10 +14030,6 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __cplusplus
|
|
-extern "C" void exit (int);
|
|
-#endif
|
|
-
|
|
void fnord() { int i=42;}
|
|
int main ()
|
|
{
|
|
@@ -14055,7 +14043,7 @@
|
|
/* dlclose (self); */
|
|
}
|
|
|
|
- exit (status);
|
|
+ return status;
|
|
}
|
|
EOF
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
@@ -14136,10 +14124,6 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __cplusplus
|
|
-extern "C" void exit (int);
|
|
-#endif
|
|
-
|
|
void fnord() { int i=42;}
|
|
int main ()
|
|
{
|
|
@@ -14153,7 +14137,7 @@
|
|
/* dlclose (self); */
|
|
}
|
|
|
|
- exit (status);
|
|
+ return status;
|
|
}
|
|
EOF
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
@@ -19560,10 +19544,6 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __cplusplus
|
|
-extern "C" void exit (int);
|
|
-#endif
|
|
-
|
|
void fnord() { int i=42;}
|
|
int main ()
|
|
{
|
|
@@ -19577,7 +19557,7 @@
|
|
/* dlclose (self); */
|
|
}
|
|
|
|
- exit (status);
|
|
+ return status;
|
|
}
|
|
EOF
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
@@ -19658,10 +19638,6 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __cplusplus
|
|
-extern "C" void exit (int);
|
|
-#endif
|
|
-
|
|
void fnord() { int i=42;}
|
|
int main ()
|
|
{
|
|
@@ -19675,7 +19651,7 @@
|
|
/* dlclose (self); */
|
|
}
|
|
|
|
- exit (status);
|
|
+ return status;
|
|
}
|
|
EOF
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
@@ -24526,7 +24502,7 @@
|
|
unsigned int B = 3;
|
|
int i;
|
|
for(i=0; i<B; i++) Array[i] = i - 3;
|
|
- exit( Array[1] != -2 );
|
|
+ return Array[1] != -2;
|
|
}
|
|
_ACEOF
|
|
rm -f conftest$ac_exeext
|