File t1lib-configure-c99.patch of Package t1lib
Mostly generic fixes for avoiding calling the undeclared exit
function. This avoids implicit function declarations and failures
with future compilers.
The change to the strength-reduce GCC bug check could theoretically be
upstreamed (if upstream were still around) because it's specific to
this package.
diff -up t1lib-5.1.2/configure.configure-c99 t1lib-5.1.2/configure
--- t1lib-5.1.2/configure.configure-c99 2007-12-23 16:49:43.000000000 +0100
+++ t1lib-5.1.2/configure 2023-01-18 13:28:57.628622129 +0100
@@ -2888,7 +2888,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
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 @@ main ()
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
@@ -10322,10 +10322,6 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
@@ -10339,7 +10335,7 @@ int main ()
/* dlclose (self); */
}
- exit (status);
+ return status;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -10420,10 +10416,6 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
@@ -10437,7 +10429,7 @@ int main ()
/* dlclose (self); */
}
- exit (status);
+ return status;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -14038,10 +14030,6 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
@@ -14055,7 +14043,7 @@ int main ()
/* dlclose (self); */
}
- exit (status);
+ return status;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -14136,10 +14124,6 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
@@ -14153,7 +14137,7 @@ int main ()
/* dlclose (self); */
}
- exit (status);
+ return status;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -19560,10 +19544,6 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
@@ -19577,7 +19557,7 @@ int main ()
/* dlclose (self); */
}
- exit (status);
+ return status;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -19658,10 +19638,6 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
void fnord() { int i=42;}
int main ()
{
@@ -19675,7 +19651,7 @@ int main ()
/* dlclose (self); */
}
- exit (status);
+ return status;
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -24526,7 +24502,7 @@ int main(void) {
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