Path: utzoo!attcan!uunet!peregrine!elroy!mahendo!earle From: earle@mahendo.Jpl.Nasa.Gov (Greg Earle) Newsgroups: comp.windows.x Subject: Building the Toolkit with GNU gcc 1.30 Message-ID: <368@mahendo.Jpl.Nasa.Gov> Date: 11 Nov 88 05:41:13 GMT Reply-To: poseur!earle@mahendo.JPL.NASA.GOV (Greg Earle) Followup-To: poster Organization: Sun Microsystems - Western Area Professional Services Lines: 70 If anyone has built R3 with gcc 1.30, please get in touch with me. I'm having the following problem: Most of the contents of lib/Xt/fd.h are replicated (on SunOS 4.0, anyway) in the Sun /usr/include/sys/types.h file. In fact, I found something which might be important for Sun386i users; here's the only differences in the two files: fd.h: #ifndef __fd_set #define __fd_set #ifndef NBBY #define NBBY 8 /* number of bits in a byte */ #endif Sun : #define NBBY 8 /* number of bits in a byte */ fd.h: typedef long fd_mask; #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif Sun : typedef long fd_mask; #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #ifdef sun386 #define howmany(x, y) ((((u_int)(x))+(((u_int)(y))-1))/((u_int)(y))) #else #define howmany(x, y) (((x)+((y)-1))/(y)) #endif #endif I am using gcc 1.30 for CC with options -traditional -fcombine-regs -fstrength-reduce -fwritable-strings -W -m68020. If I leave `#include "fd.h"' in InitialI.h gcc complains about the redefinition of `fd_set', whereas `cc' does not. This causes errors in the make (particularly for nooptTMparse.c). If I comment out the `#include "fd.h"', it causes gcc to get a parse error further down in InitialI.h when processing typedef struct { Fd_set rmask; Fd_set wmask; Fd_set emask; int nfds; int count; } FdStruct; I've been able to (with slight modifications) apply the Purdue speedups to the server, and am working on the Donahue patches (albeit more non-trivial to do). I'm really looking forward to being able to compile everything with gcc, but I'm not sure what to do about this situation. Any pointers and suggestions welcome ... (Spaf, are you out there?) -- Greg Earle earle@Sun.COM Sun Microsystems poseur!earle@mahendo.JPL.NASA.GOV Los Angeles Consulting earle%mahendo@elroy.JPL.NASA.GOV ...!{cit-vax,ames}!elroy!poseur!earle ...!sun!tsunami!valley!poseur!earle