This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ppc more sensitive to duplicate typedefs?
- From: Kaoru Fukui <k_fukui at highway dot ne dot jp>
- To: howarth at bromo dot msbb dot uc dot edu
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 5 Apr 2002 17:03:31 +0900 (JST)
- Subject: Re: ppc more sensitive to duplicate typedefs?
On 4 Apr, Jack Howarth wrote:
> Hello,
> I was wondering if the following observation made any
> sense. In working over the last few years on ppclinux, using
> gcc 2.95.x I have noticed that many of the code changes I
> often had to correct included a lot of duplicate typedefs
> which caused compiler errors. Is it possible that one arch
> is more sensitive to this than another in gcc? I ask because
> I just fixed a problem with the latest xfree86 build on debian
> sid where on the ppc we were getting an error...
>
> xf86drmSiS.c:69: conflicting types for `drm_sis_mem_t'
> kernel/sis_drm.h:10: previous declaration of `drm_sis_mem_t'
> xf86drmSiS.c:73: conflicting types for `drm_sis_agp_t'
> kernel/sis_drm.h:14: previous declaration of `drm_sis_agp_t'
> xf86drmSiS.c:77: conflicting types for `drm_sis_flip_t'
> kernel/sis_drm.h:18: previous declaration of `drm_sis_flip_t'
> make[9]: *** [xf86drmSiS.o] Error 1
>
> where both xf86drmSiS.c and kernel/sis_drm.h had the same
> declarations...
Hi!
I cann't find out such typedefs in xf86drmSiS.c
Kaoru
-----------xf86drmSiS.c in xf4.2.99.1--------------------
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSiS.c,v 1.10 2001/12/15 00:59:12 dawes Exp $ */
#ifdef XFree86Server
# include "xf86.h"
# include "xf86_OSproc.h"
# include "xf86_ansic.h"
# define _DRM_MALLOC xalloc
# define _DRM_FREE xfree
# ifndef XFree86LOADER
# include <sys/mman.h>
# endif
#else
# include <stdio.h>
# include <stdlib.h>
# include <unistd.h>
# include <string.h>
# include <ctype.h>
# include <fcntl.h>
# include <errno.h>
# include <signal.h>
# include <sys/types.h>
# include <sys/ioctl.h>
# include <sys/mman.h>
# include <sys/time.h>
# ifdef DRM_USE_MALLOC
# define _DRM_MALLOC malloc
# define _DRM_FREE free
extern int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *);
extern int xf86RemoveSIGIOHandler(int fd);
# else
# include <X11/Xlibint.h>
# define _DRM_MALLOC Xmalloc
# define _DRM_FREE Xfree
# endif
#endif
/* Not all systems have MAP_FAILED defined */
#ifndef MAP_FAILED
#define MAP_FAILED ((void *)-1)
#endif
#ifdef __linux__
#include <sys/sysmacros.h> /* for makedev() */
#endif
#include "xf86drm.h"
#include "xf86drmSiS.h"
#define CONFIG_DRM_SIS
#include "drm.h"
#undef CONFIG_DRM_SIS
Bool drmSiSAgpInit(int driSubFD, int offset, int size)
{
drm_sis_agp_t agp;
agp.offset = offset;
agp.size = size;
ioctl(driSubFD, SIS_IOCTL_AGP_INIT, &agp);
return TRUE;
}