From vasallia@ukr.net  Tue May  4 05:23:12 2004
Return-Path: <vasallia@ukr.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 47F6516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  4 May 2004 05:23:12 -0700 (PDT)
Received: from mail-kv.alkar.net (mail-kv.alkar.net [195.248.176.165])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AA37443D5A
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  4 May 2004 05:23:10 -0700 (PDT)
	(envelope-from vasallia@ukr.net)
Received: from 238-92.dialup.alkar.net ([212.86.238.92] helo=santinel.home.ua)
	by mail-kv.alkar.net with esmtp
	id 1BKywG-000Hv2-KW
	for FreeBSD-gnats-submit@freebsd.org; Tue, 04 May 2004 15:22:21 +0300
Received: from anray by santinel.home.ua with local (Exim)
	id 1BKy57-000NM4-Qh
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 04 May 2004 14:27:25 +0300
Message-Id: <E1BKy57-000NM4-Qh@santinel.home.ua>
Date: Tue, 04 May 2004 14:27:25 +0300
From: Andrey Slusar <vasallia@ukr.net>
Reply-To: Andrey Slusar <vasallia@ukr.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] databases/msql: fix compiling whith gcc >= 3.3
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66250
>Category:       ports
>Synopsis:       [PATCH] databases/msql: fix compiling whith gcc >= 3.3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 04 05:30:07 PDT 2004
>Closed-Date:    Tue May 04 13:49:15 PDT 2004
>Last-Modified:  Tue May 04 13:49:15 PDT 2004
>Originator:     Andrey Slusar
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Santinel
>Environment:
System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Tue Apr 27 17:54:43 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386
>Description:
	In OSVERSION > 501103 gcc3.3, ANSI_ARGS not defined.
	Compiling:
===
cc  -O2 -pipe -march=athlon-xp -I../ -DHAVE_CONFIG_H -DHAVE_SSIZE_T -DHAVE_U_INT -DHAVE_BIT_TYPES -D_OS_UNIX -fpic -DPIC  -DHAVE_DIRENT_H -DHAVE_DIRENT -DHAVE_MMAP -DMSYNC_3   -DINST_DIR='"/usr/local"' -DTARGET='"FreeBSD-5.2-CURRENT-i386"' -DHAVE_RLIMIT_NOFILE -o libmsql.o -c libmsql.c
In file included from libmsql.c:52:
/usr/include/varargs.h:34:2: #error "<varargs.h> is obsolete with this version of GCC."
/usr/include/varargs.h:35:2: #error "Change your code to use <stdarg.h> instead."
libmsql.c:222: error: syntax error before "va_dcl"
libmsql.c:234: warning: parameter names (without types) in function declaration
libmsql.c:234: warning: data definition has no type or storage class
libmsql.c:235: error: `args' undeclared here (not in a function)
libmsql.c:235: error: syntax error before "int"
libmsql.c:235: warning: data definition has no type or storage class
libmsql.c:236: error: conflicting types for `fmt'
libmsql.c:232: error: previous declaration of `fmt'
libmsql.c:236: error: `args' undeclared here (not in a function)
libmsql.c:236: error: syntax error before "char"
libmsql.c:236: warning: data definition has no type or storage class
*** Error code 1

Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386/msql.
*** Error code 1

Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386/msql.
*** Error code 1

Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386.
*** Error code 1

Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386.
*** Error code 1

Stop in /usr/ports/databases/msql/work/msql-2.0.12.
*** Error code 1

Stop in /usr/ports/databases/msql.
===	
>How-To-Repeat:
	Compile port whith FreeBSD > 5.1
>Fix:

--- msql.diff begins here ---
diff -ruN msql/Makefile msql.new/Makefile
--- msql/Makefile	Sat Apr 10 21:30:18 2004
+++ msql.new/Makefile	Tue May  4 14:08:15 2004
@@ -67,6 +67,10 @@
 
 .include <bsd.port.pre.mk>
 
+.if ${OSVERSION} > 501103
+EXTRA_PATCHES+= ${PATCHDIR}/gcc33-patch
+.endif
+
 .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
 IGNORE="- You must manually obtain ${DISTFILES} from 'http://www.Hughes.com.au/download/' and place it in ${DISTDIR}.  The distribution requires registration prior to use"
 .endif
diff -ruN msql/files/gcc33-patch msql.new/files/gcc33-patch
--- msql/files/gcc33-patch	Thu Jan  1 03:00:00 1970
+++ msql.new/files/gcc33-patch	Tue May  4 14:00:25 2004
@@ -0,0 +1,20 @@
+--- src/msql/libmsql.c.orig	Wed Aug 22 03:17:08 2001
++++ src/msql/libmsql.c	Tue May  4 13:42:18 2004
+@@ -31,6 +31,7 @@
+ #  include <stdlib.h>
+ #  include <string.h>
+ 
++#define ANSI_ARGS
+ 
+ #if defined(_OS_WIN32)
+ #  include <winsock.h>
+--- src/msql/msqld.c.old	Tue May  4 13:52:34 2004
++++ src/msql/msqld.c	Tue May  4 13:52:56 2004
+@@ -23,6 +23,7 @@
+ #  include <os2.h>
+ #endif
+ 
++#define ANSI_ARGS
+ 
+ #include <stdio.h>
+ #include <fcntl.h>
--- msql.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue May 4 13:48:48 PDT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66250 
>Unformatted:
