DragonFly BSD
DragonFly bugs List (threaded) for 2005-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Okay, so what do we do with the new errno?


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 May 2005 09:21:43 -0700 (PDT)

:After today's update I started to recompile all of my ports again
:(yes, I was well aware that I must) but the first port I tried
:(bash) died because of this line in psize.c:
:
:extern int errno;
:
:and this obviously conflicts with the definition in /usr/include/errno.h
:
:extern __thread int  errno;
:
:So -- what kind of patching does bash need?  The bash port might be a
:useful place to explain how this is going to work.  I see that errno.h
:includes a message about ports that want to define errno as a normal
:'int' but the provided workaround doesn't seem to work:
:
:#define errno   errno
:
:Is that really the intended definition, or a typo?
:
:Thanks for any clues.

    That's the intended definition, to work around programs which check
    to see if errno is a macro and declare it extern int if it isn't.

    The only thing we can do for programs which declare errno regardless
    of anything else is to rip out such declarations and throw an
    #include <errno.h> in instead.  Those programs are plain and simply
    broken and the authors need to fix their code.
 
					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]