Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am porting a very big C++ project from Visual Studio to a Solaris machine, probably using Eclipse. As a first step I am trying to get it to compile under Cygwin/Eclipse/gcc on my Windows machine. It's going quite well, but now I need some specialist help.

The code uses _sopen and _close, _SH_DENYNO and suchlike. These and other things mean the Windows version includes Microsoft files io.h, fcntl.h and share.h. My Eclipse/Cygwin has these files available with the same names. That's handy.

This week I plan to push the whole lot onto the Solaris, and of course there aren't any Microsoft files there. There must be something else available, can somebody tell me where to look?
Posted

1 solution

On Solaris you must use the POSIX standard file functions like open() and close(). File locking is done using separate functions like fcntl() and lockf() instead of options to the opening command.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-May-11 17:45pm    
Agreed, my 5. If the application can keep to the subset defined by POSIX, it is portable. However, is portability was not a goal during development, porting can be really painful it possible at all.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900