[Xquartz-dev] 2.3.2_beta3 on Tiger in X11R7.2

Peter Dyballa Peter_Dyballa at Freenet.DE
Sat Nov 22 13:34:53 PST 2008


Am 21.11.2008 um 14:36 schrieb Jeremy Huddleston:

> 7.0.2 will work, but use 7.0.4 since it has bugfixes.


To me on Tiger it's the other way 'round! Mesa-7.0.4/bin/mklib has

   635	            if [ ${EXPORTS} ] ; then
   636	                OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
   637	            fi

G++ (powerpc-apple-darwin8-g++-4.0.1) does not seem to understand  
this. Only libGL.1.2.dylib and a few sym-links were created. With the  
lines above commented, the missing libraries were built and all  
installed.


Later, when the demos were built:

	glxcontexts.c:60: error: storage size of ‘tz’ isn’t known
	glxgears.c:60: error: storage size of ‘tz’ isn’t known
	glxgears_fbconfig.c:74: error: storage size of ‘tz’ isn’t known
	glxswapcontrol.c:87: error: storage size of ‘tz’ isn’t known

The line is each time:

	   struct timezone tz;

followed by:

	   (void) gettimeofday(&tv, &tz);

Before they have:

	#include <sys/time.h>
	#include <unistd.h>


The reason for this seems to be that the gcc invocation contains - 
D_POSIX_C_SOURCE=199309L and /usr/include/sys/time.h has:

   153	#ifndef _POSIX_C_SOURCE
   154	/*
   155	 * Structure defined by POSIX.4 to be like a timeval.
   156	 */
   157	#ifndef _TIMESPEC
   158	#define _TIMESPEC
   159	struct timespec {
   160		time_t	tv_sec;		/* seconds */
   161		long	tv_nsec;	/* and nanoseconds */
   162	};
   163	
   164	#endif
   165	
   166	
   167	
   168	
   169	#define	TIMEVAL_TO_TIMESPEC(tv, ts) {					\
   170		(ts)->tv_sec = (tv)->tv_sec;					\
   171		(ts)->tv_nsec = (tv)->tv_usec * 1000;				\
   172	}
   173	#define	TIMESPEC_TO_TIMEVAL(tv, ts) {					\
   174		(tv)->tv_sec = (ts)->tv_sec;					\
   175		(tv)->tv_usec = (ts)->tv_nsec / 1000;				\
   176	}
   177	
   178	struct timezone {
   179		int	tz_minuteswest;	/* minutes west of Greenwich */
   180		int	tz_dsttime;	/* type of dst correction */
   181	};
.....
   228	#endif /* ! _POSIX_C_SOURCE */
   229	
   230	
   231	
   232	__BEGIN_DECLS
   233	
   234	#ifndef _POSIX_C_SOURCE
   235	#include <time.h>
   236	
   237	int	adjtime(const struct timeval *, struct timeval *);
   238	int	futimes(int, const struct timeval *);
   239	int	settimeofday(const struct timeval *, const struct timezone  
*);
   240	#endif /* ! _POSIX_C_SOURCE */
   241	
   242	int	getitimer(int, struct itimerval *);
   243	int	gettimeofday(struct timeval * __restrict, struct timezone  
* __restrict);
   244	int	select(int, fd_set * __restrict, fd_set * __restrict,
   245			fd_set * __restrict, struct timeval * __restrict);
   246	int	setitimer(int, const struct itimerval * __restrict,
   247			struct itimerval * __restrict);
   248	int	utimes(const char *, const struct timeval *);
   249	
   250	__END_DECLS
   251	
   252	
   253	#endif /* !_SYS_TIME_H_ */


Including time.h isn't right either, because it does not have  
gettimeofday(). Anyway, the demos are not really needed, I just  
packed out their sources for the first time!


Xinit was not built, because:

	xinit.c:64:26: error: Availability.h: No such file or directory

AvailabilityMacros.h seems to be the correct name.


--
Greetings

   Pete

These are my principles and if you don't like them... well, I have  
others.
				- Groucho Marx





More information about the Xquartz-dev mailing list