Date: Wed, 19 May 2004 18:38:14 +0300 From: Andrey Slusar <vasallia@ukr.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/66896: [PATCH] devel/crossgo32: fix compiling and unbroking port Message-ID: <E1BQT94-000Jn4-Fl@santinel.home.ua> Resent-Message-ID: <200405191710.i4JHA8nP059306@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 66896 >Category: ports >Synopsis: [PATCH] devel/crossgo32: fix compiling and unbroking port >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 19 10:10:08 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Andrey Slusar >Release: FreeBSD 5.2-CURRENT i386 >Organization: Santinel >Environment: System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sat May 15 17:05:19 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386 >Description: Fix compiling >How-To-Repeat: N/A >Fix: --- crossgo32.diff begins here --- diff -ruN crossgo32/Makefile crossgo32.new/Makefile --- crossgo32/Makefile Wed May 19 02:58:49 2004 +++ crossgo32.new/Makefile Wed May 19 15:47:11 2004 @@ -9,7 +9,7 @@ PORTNAME= crossgo32 PORTVERSION= 1.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_LOCAL} \ ftp://sources.redhat.com/pub/crossgcc/ @@ -36,10 +36,6 @@ GO32DIR= ${PREFIX}/share/crossgo32 .include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 500113 -BROKEN= "Does not compile" -.endif post-extract: ${MV} ${WRKDIR}/dosrel-1.0/ ${WRKSRC} diff -ruN crossgo32/files/patch-cccp.c crossgo32.new/files/patch-cccp.c --- crossgo32/files/patch-cccp.c Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-cccp.c Wed May 19 17:34:33 2004 @@ -0,0 +1,56 @@ +--- gcc/cccp.c.old Wed May 19 15:10:39 2004 ++++ gcc/cccp.c Wed May 19 15:19:53 2004 +@@ -24,6 +24,8 @@ + + typedef unsigned char U_CHAR; + ++#define HAS_STDARG_H ++ + #ifdef EMACS + #define NO_SHORTNAMES + #include "../src/config.h" +@@ -199,7 +201,7 @@ + # endif + #endif + +-#if defined (__STDC__) && defined (HAVE_VPRINTF) ++#if defined (__STDC__) && defined (HAVE_VPRINTF) || defined (HAS_STDARG_H) + # include <stdarg.h> + # define VA_START(va_list, var) va_start (va_list, var) + # define PRINTF_ALIST(msg) char *msg, ... +@@ -8967,7 +8969,7 @@ + } + + static void +-#if defined (__STDC__) && defined (HAVE_VPRINTF) ++#if defined (__STDC__) && defined (HAVE_VPRINTF) || defined (HAS_STDARG_H) + error_with_line (int line, PRINTF_ALIST (msg)) + #else + error_with_line (line, PRINTF_ALIST (msg)) +@@ -9007,7 +9009,7 @@ + } + + static void +-#if defined (__STDC__) && defined (HAVE_VPRINTF) ++#if defined (__STDC__) && defined (HAVE_VPRINTF) || defined (HAS_STDARG_H) + warning_with_line (int line, PRINTF_ALIST (msg)) + #else + warning_with_line (line, PRINTF_ALIST (msg)) +@@ -9069,7 +9071,7 @@ + } + + void +-#if defined (__STDC__) && defined (HAVE_VPRINTF) ++#if defined (__STDC__) && defined (HAVE_VPRINTF) || defined (HAS_STDARG_H) + pedwarn_with_line (int line, PRINTF_ALIST (msg)) + #else + pedwarn_with_line (line, PRINTF_ALIST (msg)) +@@ -9091,7 +9093,7 @@ + giving specified file name and line number, not current. */ + + static void +-#if defined (__STDC__) && defined (HAVE_VPRINTF) ++#if defined (__STDC__) && defined (HAVE_VPRINTF) || defined (HAS_STDARG_H) + pedwarn_with_file_and_line (char *file, int line, PRINTF_ALIST (msg)) + #else + pedwarn_with_file_and_line (file, line, PRINTF_ALIST (msg)) diff -ruN crossgo32/files/patch-functions.def crossgo32.new/files/patch-functions.def --- crossgo32/files/patch-functions.def Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-functions.def Wed May 19 18:23:57 2004 @@ -0,0 +1,18 @@ +--- libiberty/functions.def.old Thu Jul 4 19:16:36 1996 ++++ libiberty/functions.def Wed May 19 18:21:14 2004 +@@ -34,15 +34,12 @@ + DEF(strchr, char*, (s, c), CONST char *s AND int c) + DEF(strdup, char*, (s1), char * s1) + DEF(strrchr, char*, (s, c), CONST char *s AND int c) +-DEF(strstr, char*, (), NOTHING) + DEF(strtod, double, (), NOTHING) + DEF(strtol, long, (), NOTHING) + DEF(strtoul, unsigned long, (), NOTHING) + DEF(tmpnam, char *, (s), char * s) + DEF(vfork, int, (), NOTHING) + DEF(vfprintf, int, (), NOTHING) +-DEF(vprintf, int, (), NOTHING) +-DEF(vsprintf, int, (), NOTHING) + DEF(sigsetmask, int, (), NOTHING) + DEF(alloca, PTR, (size), size_t size) + DEF(waitpid, int, (pid, statp, opts), int pid AND int* statp AND int opts ) diff -ruN crossgo32/files/patch-g++.c crossgo32.new/files/patch-g++.c --- crossgo32/files/patch-g++.c Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-g++.c Wed May 19 15:45:43 2004 @@ -0,0 +1,10 @@ +--- gcc/cp/g++.c.old Wed May 19 15:33:04 2004 ++++ gcc/cp/g++.c Wed May 19 15:33:19 2004 +@@ -92,7 +92,6 @@ + extern int errno; + #endif + +-extern int sys_nerr; + #ifndef HAVE_STRERROR + #if defined(bsd4_4) + extern const char *const sys_errlist[]; diff -ruN crossgo32/files/patch-gcc.c crossgo32.new/files/patch-gcc.c --- crossgo32/files/patch-gcc.c Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-gcc.c Wed May 19 15:45:43 2004 @@ -0,0 +1,10 @@ +--- gcc/gcc.c.old Wed May 19 15:29:39 2004 ++++ gcc/gcc.c Wed May 19 15:29:46 2004 +@@ -175,7 +175,6 @@ + extern int errno; + #endif + +-extern int sys_nerr; + #ifndef HAVE_STRERROR + #if defined(bsd4_4) + extern const char *const sys_errlist[]; diff -ruN crossgo32/files/patch-protoize.c crossgo32.new/files/patch-protoize.c --- crossgo32/files/patch-protoize.c Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-protoize.c Wed May 19 17:35:19 2004 @@ -0,0 +1,30 @@ +--- gcc/protoize.c.orig Mon Oct 9 18:37:32 1995 ++++ gcc/protoize.c Wed May 19 16:16:12 2004 +@@ -22,6 +22,8 @@ + as __STDC__ plus more, so make sure that __STDC__ is defined if + __cplusplus is defined. */ + ++#define HAS_STDARG_H ++ + #if defined(__cplusplus) && !defined(__STDC__) + #define __STDC__ 1 + #endif /* defined(__cplusplus) && !defined(__STDC__) */ +@@ -57,7 +59,9 @@ + #define _POSIX_SOURCE + #endif + ++#ifndef HAS_STDARG_H + #include <varargs.h> ++#endif + /* On some systems stdio.h includes stdarg.h; + we must bring in varargs.h first. */ + #include <stdio.h> +@@ -66,7 +70,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #ifndef _WIN32 +-#if defined(POSIX) || defined(CONCURRENT) ++#if defined(POSIX) || defined(CONCURRENT) || defined (HAS_STDARG_H) + #include <dirent.h> + #else + #include <sys/dir.h> diff -ruN crossgo32/files/patch-strerror.c crossgo32.new/files/patch-strerror.c --- crossgo32/files/patch-strerror.c Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-strerror.c Wed May 19 15:45:43 2004 @@ -0,0 +1,10 @@ +--- libiberty/strerror.c.old Wed May 19 15:01:49 2004 ++++ libiberty/strerror.c Wed May 19 15:01:55 2004 +@@ -460,7 +460,6 @@ + + #else + +-extern int sys_nerr; + extern char *sys_errlist[]; + + #endif diff -ruN crossgo32/files/patch-strsignal.c crossgo32.new/files/patch-strsignal.c --- crossgo32/files/patch-strsignal.c Thu Jan 1 03:00:00 1970 +++ crossgo32.new/files/patch-strsignal.c Wed May 19 15:45:43 2004 @@ -0,0 +1,10 @@ +--- libiberty/strsignal.c.old Wed May 19 15:05:20 2004 ++++ libiberty/strsignal.c Wed May 19 15:05:32 2004 +@@ -235,7 +235,6 @@ + + #else + +-static int sys_nsig = NSIG; + extern const char * const sys_siglist[]; + + #endif --- crossgo32.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BQT94-000Jn4-Fl>