Re: [uCsimm] snmpd from coldfire

From: Tom Walsh (tom@cyberiansoftware.com)
Date: Fri May 25 2001 - 08:19:09 EDT


Erwin Authried wrote:
>
> Tom Walsh[SMTP:tom@cyberiansoftware.com] wrote:
> > Erwin Authried wrote:
> > >
> > >
> > > Yeah, just include <asm/byteorder.h>. And don't forget to compile with -O or -O2,
> > > otherwise the ntohs function will not be inlined. And since you are obviously
> > > using the gcc with my 32-bit PIC patch, don't forget to add a _cleanup() dummy
> > > function at the end of your object files, or add it to libc so that you can forget
> > > this nasty problem forever.
> > >
> >
> > ??? What?! You mean that gcc doesn't properly process the inline
> > statements unless the optimizer is turned on? That seems odd, doesn't
> > it?
> >
> > Regards,
> >
> > TomW
> >
> It's not the compiler. The macros are inside a #ifdef __OPTIMIZE__ conditional in byteorder.h
>

AHA! I didn't notice that.. I had some trouble with getting the byte
ordering stuff to work with one application and I just gave up in
frustration & removed the ntohX() stuff. Guess I was tired that
night/morning?!

Regards,

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST