[okl4-developer] Starting with graphic output

Nelson Tam nelson at ok-labs.com
Wed Apr 30 00:49:28 EST 2008


Hi Remy,

On 30/04/2008, at 2:05 AM, Remy Gottschalk wrote:
>
> I finally found out what went wrong. It was in fact a nasty include
> problem.
> I added in my Makefile the build/iguana/include/ dir with -I option  
> and
> that was my mistake. So build/iguana/include/fcntl.h was included in
> place of the wanted fcntl.h.
> I detail in build/iguana/include/fcntl.h we found :
> #define O_ACCMODE       0x3
> #define O_RDONLY        0x1
> #define O_WRONLY        0x2
> #define O_RDWR          (O_RDONLY | O_WRONLY)
>
> And in  /usr/include/asm-generic/fcntl.h
> #define O_ACCMODE       00000003
> #define O_RDONLY        00000000
> #define O_WRONLY        00000001
> #define O_RDWR          00000002
>
> So including the wrong file I got the wrong values. Now I include the
> correct one and it works fine. Furthermore since in v.1.5.2 no file
> named fcntl.h was in build/iguana/include the problem appeared when I
> switched to v2.1.
> By the way if someone know the historical reason behind O_RDWR not  
> being
> defined as (O_RDONLY | O_WRONLY) I'd be glad to hear the story :).


Wow, that _is_ nasty.  I'm glad you found it.

I don't know the exact reasons behind the differences, but I would  
guess that the Iguana fcntl.h might be forked from the Linux  
counterpart that was most current at the time.  The definition then  
changed in Linux.
--
(nt)

Nelson Tam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1560 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20080430/64c24ef6/attachment.bin 


More information about the Developer mailing list