Nico Heinze wrote:
> Hi all,
> 
> currently I'm working on a project which is supposed to run without
> any changes to the code base on Windows and on various Unix
> derivatives (such as Linux); recompiling the same source code has to
> suffice in order to make the code work on all platforms.
> In order to achieve this independency of the platform, I'm defining
> many runtime routines for myself which I'll use throughout the project.
> 
> Many POSIX functions like sprintf() will work both under Unix and
> under Windows without changes. However, when for example I want to
> scan a directory for the files contained hereinwith, things become
> difficult because the POSIX functions opendir(), readdir(), and
> closedir() simply don't exist under Windows.
> Even worse, some things work almost in the same way but not completely
> (such as the sockets libraries).
> Another common example (even more subtle than the differences in the
> sockets library) is the fact that open() under Windows usually opens
> in text mode even when giving access mode O_RDONLY whereas open()
> under Unix opens in binary mode.
> Microsoft's developer network MSDN gives a couple of hints what
> Windows functions can be used to substitute various POSIX functions,
> but I don't have the time or the detailed Windows knowledge to
> identify all those differing functions, APIs, and the like all at once
> on my own.
> 
> Now my question is: is there one single web site which will tell me
> all those differences at the back end layer?


No.  And there is rarely a 1:1 mapping between OSes.  Safe C++ is the 
way I approach the problem by treating POSIX the same way I treat all 
APIs and third-party libraries - relegate them to the library layer.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* VerifyMyPC 2.1
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.

Free for personal use, $10 otherwise.
http://www.CubicleSoft.com/VerifyMyPC/

Reply via email to