public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tanes Sriviroolchai <tanes73@yahoo.com>
To: Brother Tuck <brothertuck72@hotmail.com>, robertlipe@usa.net
Cc: tanes73@yahoo.com, gcc@gcc.gnu.org, gcc-help@gcc.gnu.org
Subject: Re: On NCR 4.3.03 conflict at compile time using gcc 2.95.3
Date: Thu, 05 Apr 2001 02:03:00 -0000	[thread overview]
Message-ID: <20010405090301.67944.qmail@web11101.mail.yahoo.com> (raw)
In-Reply-To: <F950MjkatwD43oFLaqS00002fb2@hotmail.com>

Emmanuel,
   I don't think this is a good way to exclude all stuffs in byteorder.h
since there are some defines you might need (e.g. LITTLE_ENDIAN, etc.).
Only declarations and inline codes need to be removed.

Regards,
Tanes Sriviroolchai

--- Brother Tuck <brothertuck72@hotmail.com> wrote:
> Thanks to all for your help. But I have found another way to resolv
> it. But 
> I'm not sure
> about the side effect.
> I have edit in the endian.h provide by gcc.  I have found the
> following 
> macros definition, at line 35 in my endian.h file.
> 
> #if BYTE_ORDER == LITTLE_ENDIAN
> 
> #include <sys/byteorder.h>
> 
> #else   /* BYTE_ORDER */
> 
> #define ntohl(x)        (x)
> #define htonl(x)        (x)
> #define ntohs(x)        (x)
> #define htons(x)        (x)
> 
> #endif  /* BYTE_ORDER */
> 
> To correct my problem, I have just add a define before  the include of
> the 
> file <sys>/byteorder.h. I put a define because, I'm not sure about the
> side 
> effect.
> #if BYTE_ORDER == LITTLE_ENDIAN
> 
> #ifndef __REMOVE_INCLUDE_OF_BYTEORDER_H
> #include <sys/byteorder.h>
> #endif
> 
> #else   /* BYTE_ORDER */
> 
> #define ntohl(x)        (x)
> #define htonl(x)        (x)
> #define ntohs(x)        (x)
> #define htons(x)        (x)
> 
> #endif  /* BYTE_ORDER */
> 
> 
> When I compile my source using the flag
> -D__REMOVE_INCLUDE_OF_BYTEORDER_H
> I have no problem....
> Is it a good way to ??
> 
> Regards,
> Emmanuel Soden
> 
> >
> >Brother Tuck wrote:
> >
> > > I have built successfully the gcc 2.95.3 on NCR 4.3.03.
> >
> >I've never tried that precise combination, but having some experience
> >with SVR4-like substances on IA32, this sounds familiar.
> >
> > > /usr/include/arpa/inet.h:67: declaration of C function `in_port_t
> > > htons(short unsigned int)' conflicts with
> > > 
>
>/usr/local/gcc/2.95.3/lib/gcc-lib/i586-ncr-sysv4.3.03/2.95.3/include/sys/byteorder.h:60:
> > > previous declaration `short unsigned int htons(unsigned int)' here
> > > /usr/include/arpa/inet.h:69: declaration of C function `in_port_t
> > > ntohs(short unsigned int)' conflicts with
> > > 
>
>/usr/local/gcc/2.95.3/lib/gcc-lib/i586-ncr-sysv4.3.03/2.95.3/include/sys/byteorder.h:140:
> > > previous declaration `short unsigned int ntohs(unsigned int)' here
> >
> >
> >I'm guessing that <sys/byteorder.h> is using vendor asms to implement
> >those functions and not properly bracketing them with a test that the
> >vendor compiler is in use.  I fixed this back in '99 or so for SVR5,
> >but the code in inclhack.def might be too conservative to match on
> your
> >hostname.  I don't recall if that code was in 2.95 or now.  Search
> for
> >"endian.h" in inclhack.def if you have to backport that to 2.95.
> >
> >It has also been fixed in later SVR5 builds by adding a test that the
> >vendor compiler is used around the __asm calls.
> >
> >
> 
>
_________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com .
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

  reply	other threads:[~2001-04-05  2:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-05  1:30 Brother Tuck
2001-04-05  2:03 ` Tanes Sriviroolchai [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-04-05  8:14 Brother Tuck
2001-04-05  3:55 Brother Tuck
2001-04-05  8:05 ` Robert Lipe
2001-04-04  9:11 Brother Tuck
2001-04-04 11:26 ` Robert Lipe
2001-04-05  1:58 ` Tanes Sriviroolchai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010405090301.67944.qmail@web11101.mail.yahoo.com \
    --to=tanes73@yahoo.com \
    --cc=brothertuck72@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=robertlipe@usa.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).