Re: Strange output of gcc -E on GNU/Hurd

2012-07-16 Thread Thomas Schwinge
Hi!

On Sun, 15 Jul 2012 16:32:06 -0400, Barry deFreese bdefre...@debian.org wrote:
 In looking at libprelude it generates a lot of files using gawk.  The 
 attached file is generated
 from gawk and then is run through gcc -E.
 
 On GNU/Hurd, I get significantly different results than I do from GNU/Linux.  
 Anyone have a clue why
 that might be or where I would look to debug this?

What errors do you get?


Grüße,
 Thomas


pgp2BZ3rneewW.pgp
Description: PGP signature


Re: Strange output of gcc -E on GNU/Hurd

2012-07-16 Thread Barry deFreese
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 7/16/2012 3:43 AM, Thomas Schwinge wrote:
 Hi!
 
 On Sun, 15 Jul 2012 16:32:06 -0400, Barry deFreese bdefre...@debian.org 
 wrote:
 In looking at libprelude it generates a lot of files using gawk.  The 
 attached file is
 generated from gawk and then is run through gcc -E.
 
 On GNU/Hurd, I get significantly different results than I do from GNU/Linux. 
  Anyone have a
 clue why that might be or where I would look to debug this?
 
 What errors do you get?
 
 
 Grüße, Thomas
 
Thomas,

I'm not getting any errors it is just that the output is so radically different 
that the package
that processes the output files is having problems.

Attached is foo.h processed by both hurd and linux.

Thanks,

Barry



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAEJFcACgkQ5ItltUs5T34pgQCeLut92VjadzC52/NhPwHM/glA
yHoAoPVZ161+tcOqRXGUiVcjutWXv4u1
=ytC2
-END PGP SIGNATURE-

# 1 foo.h
# 1 command-line
# 1 foo.h
# 25 foo.h
# 1 /usr/include/errno.h 1 3 4
# 29 /usr/include/errno.h 3 4
# 1 /usr/include/features.h 1 3 4
# 323 /usr/include/features.h 3 4
# 1 /usr/include/i386-gnu/bits/predefs.h 1 3 4
# 324 /usr/include/features.h 2 3 4
# 356 /usr/include/features.h 3 4
# 1 /usr/include/i386-gnu/sys/cdefs.h 1 3 4
# 359 /usr/include/i386-gnu/sys/cdefs.h 3 4
# 1 /usr/include/i386-gnu/bits/wordsize.h 1 3 4
# 360 /usr/include/i386-gnu/sys/cdefs.h 2 3 4
# 357 /usr/include/features.h 2 3 4
# 388 /usr/include/features.h 3 4
# 1 /usr/include/i386-gnu/gnu/stubs.h 1 3 4



# 1 /usr/include/i386-gnu/bits/wordsize.h 1 3 4
# 5 /usr/include/i386-gnu/gnu/stubs.h 2 3 4


# 1 /usr/include/i386-gnu/gnu/stubs-32.h 1 3 4
# 8 /usr/include/i386-gnu/gnu/stubs.h 2 3 4
# 389 /usr/include/features.h 2 3 4
# 30 /usr/include/errno.h 2 3 4






# 1 /usr/include/i386-gnu/bits/errno.h 1 3 4
# 10 /usr/include/i386-gnu/bits/errno.h 3 4
enum __error_t_codes
{


 EPERM = ((0x10  26) | ((1)  0x3fff)),

 ENOENT = ((0x10  26) | ((2)  0x3fff)),

 ESRCH = ((0x10  26) | ((3)  0x3fff)),

 EINTR = ((0x10  26) | ((4)  0x3fff)),

 EIO = ((0x10  26) | ((5)  0x3fff)),

 ENXIO = ((0x10  26) | ((6)  0x3fff)),

 E2BIG = ((0x10  26) | ((7)  0x3fff)),

 ENOEXEC = ((0x10  26) | ((8)  0x3fff)),

 EBADF = ((0x10  26) | ((9)  0x3fff)),

 ECHILD = ((0x10  26) | ((10)  0x3fff)),

 EDEADLK = ((0x10  26) | ((11)  0x3fff)),

 ENOMEM = ((0x10  26) | ((12)  0x3fff)),

 EACCES = ((0x10  26) | ((13)  0x3fff)),

 EFAULT = ((0x10  26) | ((14)  0x3fff)),

 ENOTBLK = ((0x10  26) | ((15)  0x3fff)),

 EBUSY = ((0x10  26) | ((16)  0x3fff)),

 EEXIST = ((0x10  26) | ((17)  0x3fff)),

 EXDEV = ((0x10  26) | ((18)  0x3fff)),

 ENODEV = ((0x10  26) | ((19)  0x3fff)),

 ENOTDIR = ((0x10  26) | ((20)  0x3fff)),

 EISDIR = ((0x10  26) | ((21)  0x3fff)),

 EINVAL = ((0x10  26) | ((22)  0x3fff)),

 EMFILE = ((0x10  26) | ((24)  0x3fff)),

 ENFILE = ((0x10  26) | ((23)  0x3fff)),

 ENOTTY = ((0x10  26) | ((25)  0x3fff)),

 ETXTBSY = ((0x10  26) | ((26)  0x3fff)),

 EFBIG = ((0x10  26) | ((27)  0x3fff)),

 ENOSPC = ((0x10  26) | ((28)  0x3fff)),

 ESPIPE = ((0x10  26) | ((29)  0x3fff)),

 EROFS = ((0x10  26) | ((30)  0x3fff)),

 EMLINK = ((0x10  26) | ((31)  0x3fff)),

 EPIPE = ((0x10  26) | ((32)  0x3fff)),

 EDOM = ((0x10  26) | ((33)  0x3fff)),

 ERANGE = ((0x10  26) | ((34)  0x3fff)),

 EAGAIN = ((0x10  26) | ((35)  0x3fff)),


 EINPROGRESS = ((0x10  26) | ((36)  0x3fff)),

 EALREADY = ((0x10  26) | ((37)  0x3fff)),

 ENOTSOCK = ((0x10  26) | ((38)  0x3fff)),

 EMSGSIZE = ((0x10  26) | ((40)  0x3fff)),

 EPROTOTYPE = ((0x10  26) | ((41)  0x3fff)),

 ENOPROTOOPT = ((0x10  26) | ((42)  0x3fff)),

 EPROTONOSUPPORT = ((0x10  26) | ((43)  0x3fff)),

 ESOCKTNOSUPPORT = ((0x10  26) | ((44)  0x3fff)),

 EOPNOTSUPP = ((0x10  26) | ((45)  0x3fff)),

 EPFNOSUPPORT = ((0x10  26) | ((46)  0x3fff)),

 EAFNOSUPPORT = ((0x10  26) | ((47)  0x3fff)),

 EADDRINUSE = ((0x10  26) | ((48)  0x3fff)),

 EADDRNOTAVAIL = ((0x10  26) | ((49)  0x3fff)),

 ENETDOWN = ((0x10  26) | ((50)  0x3fff)),

 ENETUNREACH = ((0x10  26) | ((51)  0x3fff)),

 ENETRESET = ((0x10  26) | ((52)  0x3fff)),

 ECONNABORTED = ((0x10  26) | ((53)  0x3fff)),

 ECONNRESET = ((0x10  26) | ((54)  0x3fff)),

 ENOBUFS = ((0x10  26) | ((55)  0x3fff)),

 EISCONN = ((0x10  26) | ((56)  0x3fff)),

 ENOTCONN = ((0x10  26) | ((57)  0x3fff)),

 EDESTADDRREQ = ((0x10  26) | ((39)  0x3fff)),

 ESHUTDOWN = ((0x10  26) | ((58)  0x3fff)),

 ETOOMANYREFS = ((0x10  26) | ((59)  0x3fff)),

 ETIMEDOUT = ((0x10  26) | ((60)  0x3fff)),

 ECONNREFUSED = ((0x10  26) | ((61)  0x3fff)),

 ELOOP = ((0x10  26) | ((62)  0x3fff)),

 ENAMETOOLONG = ((0x10  26) | ((63)  0x3fff)),

 EHOSTDOWN = ((0x10  26) | ((64)  0x3fff)),

 EHOSTUNREACH = ((0x10  26) | ((65)  0x3fff)),

 ENOTEMPTY = ((0x10  26) | ((66)  0x3fff)),

 EPROCLIM = ((0x10  26) | ((67)  0x3fff)),

 EUSERS = ((0x10  26) | ((68)  0x3fff)),

 EDQUOT = ((0x10  26) | ((69)  0x3fff)),


Re: Strange output of gcc -E on GNU/Hurd

2012-07-16 Thread Thomas Schwinge
Hi Barry!

On Mon, 16 Jul 2012 10:25:27 -0400, Barry deFreese bdefre...@verizon.net 
wrote:
 On 7/16/2012 3:43 AM, Thomas Schwinge wrote:
  On Sun, 15 Jul 2012 16:32:06 -0400, Barry deFreese bdefre...@debian.org 
  wrote:
  In looking at libprelude it generates a lot of files using gawk.  The 
  attached file is
  generated from gawk and then is run through gcc -E.
  
  On GNU/Hurd, I get significantly different results than I do from 
  GNU/Linux.  Anyone have a
  clue why that might be or where I would look to debug this?
  
  What errors do you get?
 
 I'm not getting any errors it is just that the output is so radically 
 different that the package
 that processes the output files is having problems.

OK -- so a later compilation stage is choking on this and thus emitting
error messages?

 Attached is foo.h processed by both hurd and linux.

Hurd:

 enum __error_t_codes
 {
 
 
  EPERM = ((0x10  26) | ((1)  0x3fff)),

 ((0x10  26) | ((1)  0x3fff)) PRELUDE_ERROR_EPERM

Linux:

 1 PRELUDE_ERROR_EPERM

So i'm guessing that either the later compilation stage is choking on the
presence of the Hurd version's enum definition, or on the Hurd's
pecularity of E* values and thus the PRELUDE_ERROR_* values not being
simple numerals.  Whatever it is (and whatever that code is being used
for...) it needs to be extended to cope with this.


Grüße,
 Thomas


pgpPGD1tZikrW.pgp
Description: PGP signature


Strange output of gcc -E on GNU/Hurd

2012-07-15 Thread Barry deFreese
Hi folks,

In looking at libprelude it generates a lot of files using gawk.  The attached 
file is generated
from gawk and then is run through gcc -E.

On GNU/Hurd, I get significantly different results than I do from GNU/Linux.  
Anyone have a clue why
that might be or where I would look to debug this?

Thanks!

Barry deFreese

/* Output of mkerrcodes.awk.  DO NOT EDIT.  */

/* errnos.h - List of system error values.
   Copyright (C) 2003, 2004 g10 Code GmbH

   This file is part of libgpg-error.

   libgpg-error is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public License
   as published by the Free Software Foundation; either version 2.1 of
   the License, or (at your option) any later version.
 
   libgpg-error is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public
   License along with libgpg-error; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  */



#include errno.h

#ifdef E2BIG
E2BIG   PRELUDE_ERROR_E2BIG
#endif
#ifdef EACCES
EACCES  PRELUDE_ERROR_EACCES
#endif
#ifdef EADDRINUSE
EADDRINUSE  PRELUDE_ERROR_EADDRINUSE
#endif
#ifdef EADDRNOTAVAIL
EADDRNOTAVAIL   PRELUDE_ERROR_EADDRNOTAVAIL
#endif
#ifdef EADV
EADVPRELUDE_ERROR_EADV
#endif
#ifdef EAFNOSUPPORT
EAFNOSUPPORTPRELUDE_ERROR_EAFNOSUPPORT
#endif
#ifdef EAGAIN
EAGAIN  PRELUDE_ERROR_EAGAIN
#endif
#ifdef EALREADY
EALREADYPRELUDE_ERROR_EALREADY
#endif
#ifdef EAUTH
EAUTH   PRELUDE_ERROR_EAUTH
#endif
#ifdef EBACKGROUND
EBACKGROUND PRELUDE_ERROR_EBACKGROUND
#endif
#ifdef EBADE
EBADE   PRELUDE_ERROR_EBADE
#endif
#ifdef EBADF
EBADF   PRELUDE_ERROR_EBADF
#endif
#ifdef EBADFD
EBADFD  PRELUDE_ERROR_EBADFD
#endif
#ifdef EBADMSG
EBADMSG PRELUDE_ERROR_EBADMSG
#endif
#ifdef EBADR
EBADR   PRELUDE_ERROR_EBADR
#endif
#ifdef EBADRPC
EBADRPC PRELUDE_ERROR_EBADRPC
#endif
#ifdef EBADRQC
EBADRQC PRELUDE_ERROR_EBADRQC
#endif
#ifdef EBADSLT
EBADSLT PRELUDE_ERROR_EBADSLT
#endif
#ifdef EBFONT
EBFONT  PRELUDE_ERROR_EBFONT
#endif
#ifdef EBUSY
EBUSY   PRELUDE_ERROR_EBUSY
#endif
#ifdef ECANCELED
ECANCELED   PRELUDE_ERROR_ECANCELED
#endif
#ifdef ECHILD
ECHILD  PRELUDE_ERROR_ECHILD
#endif
#ifdef ECHRNG
ECHRNG  PRELUDE_ERROR_ECHRNG
#endif
#ifdef ECOMM
ECOMM   PRELUDE_ERROR_ECOMM
#endif
#ifdef ECONNABORTED
ECONNABORTEDPRELUDE_ERROR_ECONNABORTED
#endif
#ifdef ECONNREFUSED
ECONNREFUSEDPRELUDE_ERROR_ECONNREFUSED
#endif
#ifdef ECONNRESET
ECONNRESET  PRELUDE_ERROR_ECONNRESET
#endif
#ifdef ED
ED  PRELUDE_ERROR_ED
#endif
#ifdef EDEADLK
EDEADLK PRELUDE_ERROR_EDEADLK
#endif
#ifdef EDEADLOCK
EDEADLOCK   PRELUDE_ERROR_EDEADLOCK
#endif
#ifdef EDESTADDRREQ
EDESTADDRREQPRELUDE_ERROR_EDESTADDRREQ
#endif
#ifdef EDIED
EDIED   PRELUDE_ERROR_EDIED
#endif
#ifdef EDOM
EDOMPRELUDE_ERROR_EDOM
#endif
#ifdef EDOTDOT
EDOTDOT PRELUDE_ERROR_EDOTDOT
#endif
#ifdef EDQUOT
EDQUOT  PRELUDE_ERROR_EDQUOT
#endif
#ifdef EEXIST
EEXIST  PRELUDE_ERROR_EEXIST
#endif
#ifdef EFAULT
EFAULT  PRELUDE_ERROR_EFAULT
#endif
#ifdef EFBIG
EFBIG   PRELUDE_ERROR_EFBIG
#endif
#ifdef EFTYPE
EFTYPE  PRELUDE_ERROR_EFTYPE
#endif
#ifdef EGRATUITOUS
EGRATUITOUS PRELUDE_ERROR_EGRATUITOUS
#endif
#ifdef EGREGIOUS
EGREGIOUS   PRELUDE_ERROR_EGREGIOUS
#endif
#ifdef EHOSTDOWN
EHOSTDOWN   PRELUDE_ERROR_EHOSTDOWN
#endif
#ifdef EHOSTUNREACH
EHOSTUNREACHPRELUDE_ERROR_EHOSTUNREACH
#endif
#ifdef EIDRM
EIDRM   PRELUDE_ERROR_EIDRM
#endif
#ifdef EIEIO
EIEIO   PRELUDE_ERROR_EIEIO
#endif
#ifdef EILSEQ
EILSEQ  PRELUDE_ERROR_EILSEQ
#endif
#ifdef EINPROGRESS
EINPROGRESS PRELUDE_ERROR_EINPROGRESS
#endif
#ifdef EINTR
EINTR   PRELUDE_ERROR_EINTR
#endif
#ifdef EINVAL
EINVAL  PRELUDE_ERROR_EINVAL
#endif
#ifdef EIO
EIO PRELUDE_ERROR_EIO
#endif
#ifdef EISCONN
EISCONN PRELUDE_ERROR_EISCONN
#endif
#ifdef EISDIR
EISDIR  PRELUDE_ERROR_EISDIR
#endif
#ifdef EISNAM
EISNAM  PRELUDE_ERROR_EISNAM
#endif
#ifdef EL2HLT
EL2HLT  PRELUDE_ERROR_EL2HLT
#endif
#ifdef EL2NSYNC
EL2NSYNCPRELUDE_ERROR_EL2NSYNC
#endif
#ifdef EL3HLT
EL3HLT  PRELUDE_ERROR_EL3HLT
#endif
#ifdef EL3RST
EL3RST  PRELUDE_ERROR_EL3RST
#endif
#ifdef ELIBACC
ELIBACC PRELUDE_ERROR_ELIBACC
#endif
#ifdef ELIBBAD
ELIBBAD PRELUDE_ERROR_ELIBBAD
#endif
#ifdef ELIBEXEC
ELIBEXECPRELUDE_ERROR_ELIBEXEC
#endif
#ifdef ELIBMAX
ELIBMAX PRELUDE_ERROR_ELIBMAX
#endif
#ifdef ELIBSCN
ELIBSCN PRELUDE_ERROR_ELIBSCN
#endif
#ifdef ELNRNG
ELNRNG  PRELUDE_ERROR_ELNRNG
#endif
#ifdef ELOOP
ELOOP   PRELUDE_ERROR_ELOOP
#endif
#ifdef EMEDIUMTYPE
EMEDIUMTYPE PRELUDE_ERROR_EMEDIUMTYPE
#endif
#ifdef EMFILE
EMFILE  PRELUDE_ERROR_EMFILE
#endif
#ifdef EMLINK
EMLINK  PRELUDE_ERROR_EMLINK
#endif
#ifdef EMSGSIZE
EMSGSIZEPRELUDE_ERROR_EMSGSIZE
#endif
#ifdef EMULTIHOP
EMULTIHOP  

Re: Strange output of gcc -E on GNU/Hurd

2012-07-15 Thread Samuel Thibault
Barry deFreese, le Sun 15 Jul 2012 16:32:06 -0400, a écrit :
 On GNU/Hurd, I get significantly different results than I do from GNU/Linux.

That's not very surprising for errno.h: GNU/Hurd has completely
different errno values. And its defines are not to a mere integer, but
to a macro call, which might disturb some nasty things that applications
do with E* macros.

Samuel