Date: Tue, 6 Dec 2011 16:45:00 GMT From: Christian Gusenbauer <c47g@gmx.at> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/163093: misc/astrolog fails to compile with WITHOUT_X11 set to true (patch included) Message-ID: <201112061645.pB6Gj0A4053371@red.freebsd.org> Resent-Message-ID: <201112061650.pB6Go54C070499@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163093 >Category: ports >Synopsis: misc/astrolog fails to compile with WITHOUT_X11 set to true (patch included) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 06 16:50:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Christian Gusenbauer >Release: 9.0-PRERELEASE >Organization: >Environment: FreeBSD xxx.xxx.at 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #7 r228203: Fri Dec 2 17:44:07 CET 2011 root@xxx.xxx.at:/usr/obj/spare/tmp/src-stable9/sys/BONES amd64 >Description: If one wants to build astrolog with WITHOUT_X11 defined, the build breaks with a compile error in astrolog.c. >How-To-Repeat: Set WITHOUT_X11 to true in /etc/make.conf and build the port. >Fix: The attached patch fixes the problem. Just replace the original patch-ab with the attached one. Patch attached with submission follows: --- astrolog.h.orig 1998-12-23 23:29:05.000000000 +0000 +++ astrolog.h 2011-11-30 16:32:47.000000000 +0000 @@ -52,7 +52,7 @@ /*#define MAC /* Comment out this #define if you're not compiling for a Mac. */ -#define X11 /* Comment out this #define if you don't have X windows, or */ +/*#define X11 /* Comment out this #define if you don't have X windows, or */ /* else have them and don't wish to compile in X graphics. */ /*#define WIN /* Comment out this #define if you don't have MS Windows, or */ @@ -69,9 +69,11 @@ /*#define MACG /* Comment out this #define if you don't have a Mac, or else */ /* have one and don't wish to compile in Mac screen graphics. */ +#if defined(X11) || defined(WIN) || defined(MSG) || defined(BGI) || defined(MACG) #define MOUSE /* Comment out this #define if you don't have a mouse, or */ /* don't wish to compile in mouse tracking features. This is */ /* only valid if X11, WIN, MSG, BGI, or MACG above are set. */ +#endif #define TIME /* Comment out this #define if your compiler can't take the */ /* calls to the 'time' or 'localtime' functions as in time.h */ @@ -86,7 +88,7 @@ /* 'atof' and related functions aren't defined in stdio.h, */ /* such as most PC's, Linux, VMS compilers, and NeXT's. */ -/*#define PROTO /* Comment out this #define if you have an older compiler */ +#define PROTO /* Comment out this #define if you have an older compiler */ /* which doesn't allow full Ansi function prototypes. This */ /* is for programmers only and has no effect on executable. */ @@ -131,7 +133,9 @@ */ #ifndef PC +#ifndef DEFAULT_DIR #define DEFAULT_DIR "~/astrolog" +#endif #else #define DEFAULT_DIR "C:\\ASTROLOG" #endif @@ -271,7 +275,7 @@ #endif #include <math.h> #ifdef PC -#include <malloc.h> +#include <stdlib.h> #endif #ifdef TIME #include <time.h> @@ -281,6 +285,8 @@ #define ISG #include <X11/Xlib.h> #include <X11/Xutil.h> +#else +#include <sys/types.h> #endif #ifdef WIN #define ISG @@ -1046,9 +1052,9 @@ */ #define byte unsigned char -#define word unsigned short -#define dword unsigned long -#define word4 long +#define word u_int16_t +#define dword u_int32_t +#define word4 int32_t #define real double #define _char unsigned char #define _int unsigned int >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112061645.pB6Gj0A4053371>