openbsd-ports/x11/kde/libs/patches/patch-configure
2000-03-08 03:47:40 +00:00

95 lines
2.5 KiB
Plaintext

--- configure.orig Tue Sep 7 15:23:19 1999
+++ configure Tue Mar 7 18:50:08 2000
@@ -1861,7 +1861,7 @@
aix*)
ac_symcode='[BCDTU]'
;;
-sunos* | cygwin32* | mingw32*)
+sunos* | cygwin32* | mingw32* | openbsd*)
ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
ac_symxfrm='_\1 \1'
;;
@@ -1907,7 +1907,6 @@
# Now try to grab the symbols.
ac_nlist=conftest.nm
if { (eval echo configure:1910: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
-
# Try sorting and uniquifying the output.
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
mv -f "$ac_nlist"T "$ac_nlist"
@@ -2626,7 +2625,7 @@
#include "confdefs.h"
int main() {
-} $ac_kw int foo() {
+} int $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:2633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@@ -3069,9 +3068,7 @@
cat > conftest.$ac_ext <<EOF
#line 3071 "configure"
#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
+#include <stdlib.h>
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
@@ -3095,11 +3092,11 @@
* does it exist and is it safe to write into the mmap'd area
* how to use it (BSD variants) */
#include <sys/types.h>
+#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
@@ -3137,14 +3134,6 @@
# endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
main()
{
@@ -3157,7 +3146,7 @@
/*
* First, make a file with some known garbage in it.
*/
- data = malloc(pagesize);
+ data = (char *)malloc(pagesize);
if (!data)
exit(1);
for (i = 0; i < pagesize; ++i)
@@ -3178,7 +3167,7 @@
fd = open("conftestmmap", O_RDWR);
if (fd < 0)
exit(1);
- data2 = malloc(2 * pagesize);
+ data2 = (char *)malloc(2 * pagesize);
if (!data2)
exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -3196,7 +3185,7 @@
*/
for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
+ data3 = (char *)malloc(pagesize);
if (!data3)
exit(1);
if (read(fd, data3, pagesize) != pagesize)