Re: [gtk-list] Re: Poblem compiling Glib 1.2.4
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Poblem compiling Glib 1.2.4
- Date: Thu, 26 Aug 1999 00:22:41 +0200 (CEST)
On Wed, 25 Aug 1999, Kevin Handy wrote:
> I got the FAQ out of the source code for GCC-2.95.1, and seems
> to be available at http://egcs.cygnus.com/faq.html , but the
> section in question reads as follows:
>
> FD_ZERO macro
> The FD_ZERO macro in (e.g.) libc-5.4.46 is incorrect. It uses
> [72]invalid asm clobbers. The following rewrite by Ulrich Drepper
> <drepper@cygnus.com> should fix this for glibc 2.0:
>
> # define __FD_ZERO(fdsetp) \
> do { \
> int __d0, __d1; \
> __asm__ __volatile__ ("cld; rep; stosl" \
>: "=m" (((__fd_mask *) \
> (fdsetp))[__FDELT (__FD_SETSIZE)]), \
> "=&c" (__d0), "=&D" (__d1) \
>: "a" (0), "1" (sizeof (__fd_set) \
> / sizeof (__fd_mask)), \
> "2" ((__fd_mask *) (fdsetp)) \
>: "memory"); \
> } while (0)
>
> The error generated reads
the FAQ clearly states that this is a libc5+gcc2.95 bug (read the "asm clobber"
section on this). since libc5 is fairly uncommon these days, and you actually
bothered updating your compiler, i guess the best fix is to update to glibc
as well. alternatively you can of course patch your libc include files to
use the above __FD_ZERO definition, fixing this in glib is the wrong approach,
as you'll encounter the same problem when compiling other programs.
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]