File hylafax-6.0.4-configure.patch of Package hylafax

--- configure
+++ configure
@@ -832,7 +832,7 @@
 # NB: use ANSI C prototype to weed out non-ANSI compilers.
 #
 cat>dummy.c<<EOF
-main(int argc, char* argv) { exit(0); }
+int main(int argc, char* argv[]) { exit(0); }
 EOF
 
 checkCompiler()
@@ -983,7 +983,7 @@
 # Make dependency information.
 #
 cat>dummy.c<<EOF
-main(int argc, char* argv) { exit(0); }
+int main(int argc, char* argv[]) { exit(0); }
 EOF
 capture cat dummy.c
 if capture "$CCOMPILER -c -M $MKDEPCOPTS dummy.c | grep '^dummy.o[ 	]*:[ 	]*dummy.c'"; then
@@ -1556,8 +1556,8 @@
     f=$1; shift
     libs="$@";
     cat>t.c<<EOF
-int t() { $f(); return 0; }
-int main(){ t(); return 0; }
+int t(void) { $f(); return 0; }
+int main(int argc, char *argv[]){ t(); return 0; }
 EOF
     capture cat t.c
     runMake t "t:; \${CCF} t.c $libs"
@@ -1572,8 +1572,8 @@
     a=$1; shift
     libs="$@";
     cat>t.c<<EOF
-int t() { $f($a); return 0; }
-int main(){ t(); return 0; }
+int t(void) { $f($a); return 0; }
+int main(int argc, char *argv[]){ t(); return 0; }
 EOF
     capture cat t.c
     runMake t "t:; \${CCF} t.c $libs"
@@ -1630,7 +1630,8 @@
 {
     return(0);
 }
-main()
+
+int main()
 {
     struct pam_conv conv = { pamconv };
 }
@@ -2177,7 +2178,7 @@
 #
 CheckForFunc()
 {
-    echo "extern int $1(); main(){$1($2);exit(0);}" >t.c
+    echo "extern int $1(); int main(int argc, char *argv[]){$1($2);exit(0);}" >t.c
     capture cat t.c
     runMake t "t:; \${CC} t.c ${MACHDEPLIBS}"
 }
@@ -2319,7 +2320,7 @@
 {
     cat>t.c++<<EOF
 #include <sys/types.h>
-#include <signal.h>
+#include <csignal>
 void sigHUP(int) {}
 void f() {
     struct sigvec sv;
@@ -2335,7 +2336,7 @@
 {
     cat>t.c++<<EOF
 #include <sys/types.h>
-#include <signal.h>
+#include <csignal>
 void sigHUP(int) {}
 void f() {
     struct sigaction sa;
@@ -2351,7 +2352,7 @@
 {
     cat>t.c++<<EOF
 #include <sys/types.h>
-#include <signal.h>
+#include <csignal>
 void sigHUP(int) {}
 void f() { (void) signal(SIGHUP, $1 (sigHUP)); }
 int main() { f(); return 0; }
@@ -2398,7 +2399,7 @@
 EOF
     }
 cat<<'EOF'
-extern char* malloc();
+extern void* malloc(unsigned long s);
 static void
 boom(const char* msg)
 {
@@ -2407,7 +2408,7 @@
 }
 
 int
-main()
+main(int argc, char *argv[])
 {
     const char* filename = "conftestmmap";
     char* buf;
@@ -2449,7 +2450,7 @@
 	echo "$i"
     done
     cat<<EOF
-main()
+int main()
 {
     struct $decl x;
     x.ut_exit.e_exit = 0;
@@ -2466,7 +2467,7 @@
 {
     (echo '#include <time.h>'
     cat<<EOF
-main()
+int main()
 {
     struct tm x;
     char* cp;
@@ -2485,7 +2486,7 @@
 {
     cat>t.c<<EOF
 #include <sys/ioctl.h>
-main()
+int main(int argc, char *argv[])
 {
     ioctl(0, TXADDCD, "rts");
     ioctl(0, TXDELCD, "rts");
@@ -2534,7 +2535,7 @@
     cat>t.c<<EOF
 #include <stdio.h>
 #include "tiffio.h"
-main()
+int main(int argc, char *argv[])
 {
     printf( "header_ver=%d lib_ver=%s", TIFFLIB_VERSION, TIFFGetVersion() );
     exit(0);
@@ -2882,7 +2883,7 @@
     CheckForFunc fchmod && {
 	echo '#define HAS_FCHMOD 1'
 	Note "... configure use of fchmod"
-	CheckFuncDecl fchmod 'extern int fchmod(int, mode_t);' \
+	CheckFuncDecl fchmod 'extern int fchmod(int, __mode_t) __THROW;' \
 	    unistd.h libc.h $OSFCNH sys/stat.h
     }
     CheckFuncDecl mknod 'extern int mknod(const char*, mode_t, dev_t);' \
@@ -3259,8 +3260,9 @@
 CheckForSyslog()
 {
     (echo '#include <syslog.h>';
+     echo '#include <stdlib.h>';
      echo '#include "port.h"';
-     echo 'main(){syslog(0,"foo");exit(0);}') >t.c
+     echo 'int main(int argc, char *argv[]){syslog(0,"foo");exit(0);}') >t.c
     capture cat t.c
     runMake t "t:; \${CC} t.c ${MACHDEPLIBS}"
 }
@@ -3268,8 +3270,9 @@
 {
     (echo '#include <syslog.h>';
      echo '#include <stdarg.h>';
+     echo '#include <stdlib.h>';
      echo '#include "port.h"';
-     echo 'main(){va_list ap; vsyslog(0,"foo", ap);exit(0);}') >t.c
+     echo 'int main(int argc, char *argv[]){va_list ap; vsyslog(0,"foo", ap);exit(0);}') >t.c
     capture cat t.c
     runMake t "t:; \${CC} t.c ${MACHDEPLIBS}"
 }
@@ -3293,7 +3296,7 @@
 #
 cat>t.c<<EOF
 #include "zlib.h"
-main()
+int main(int argc, char *argv[])
 {
     if (strcmp(ZLIB_VERSION, "0.95") < 0) {     /* include file version */
         printf("old include files: version %u\n", ZLIB_VERSION);
@@ -3436,7 +3439,7 @@
 	fi
 	;;
     *-linux*)
-	if [ "X${DIR_LIB}" != "X/usr/lib" ]; then
+	if [ "X${DIR_LIB}" != "X/usr/lib" -a "X${DIR_LIB}" != "X/usr/lib64" ]; then
 	    USE_RPATH=' -Wl,-rpath,${LIBDIR}'
 	else
 	    USE_RPATH=''
@@ -3450,7 +3453,7 @@
 	CheckCCDSO()
 	{
 	$RM t.c t.o t.${DSOSUF}
-	echo 'int f() { return 0; }'>t.c
+	echo 'int f(void) { return 0; }'>t.c
 	capture cat t.c
 	runMake t \
 	    't.o:; ${CCF} -c t.c' \
@@ -3467,7 +3470,7 @@
 	}
 	;;
     *-solaris*)
-	if [ "X${DIR_LIB}" != "X/usr/lib" ]; then
+	if [ "X${DIR_LIB}" != "X/usr/lib" -a "X${DIR_LIB}" != "X/usr/lib64" ]; then
 	    USE_RPATH=' -R${LIBDIR}'
 	else
 	    USE_RPATH=''
openSUSE Build Service is sponsored by