Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 10 May 2013 7:24:04 -0400
From:  <>
Subject: os.h usage

Shouldn't we add to this?  I think another area where there is a lot of OS dependent stuff, is in includes.

I was just wondering if the os.h file is 'open' for modifications?  There already is one issue that I know of in the os.h. That is in the FLOCK section.  The whole flock section should be wrapped with a #if defined (_MSC_VER)  setting OS_FLOCK to 0 for it.  There is no <sys/file.h> for VC

But I think a lot of the very ugliness in the #include block, can be hidden with 'less' ugly defines.

So instead of:

#if !defined (_MSC_VER) && !defined (__MINGW32__) && !defined (__SOME_OTHER_OS__)
#include <somefile.h>

We could have:

#include <somefile.h>

Then set the HAS_SOMEFILE_H in os.h using the OS specific defines.

Still not the most elegant, but at least it hides some of the ugliness.

Also, I am really not sold on the 'NEEDS_OS_TIMER', 'NEEDS_OS_FLOCK', .....  Would it not be better to simply set all of the defined constants, whenever os.h is loaded? 


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.