LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-18-2009, 10:02 PM   #1
Kunsheng
Member
 
Registered: Mar 2009
Posts: 82

Rep: Reputation: 16
Replacement for <unistd.h>, <sys/wait.h> and <signal.h> in Windows ?


Hello everyone,

I am converting a Linux app to Windows with Visual Studio 2005 ( Win32 console app).

Basically I need counterparts of fork(), signalset functions under Windows. <csignal> is a said to be a replacement for <signal.h> according to MSDN (I haven't confirmed it yet).

Does anyone have some idea on replacement of <sys/wait.h> and <unistd.h> ?

Do they have a completed alternative header files or need to be specific on functions ?


Thanks,

-Kun
 
Old 06-18-2009, 10:12 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Which headers you need depends largely on which functions you're using. It's conceivable, for example, that all you might need is "<windows.h>".

MSDN is a joy to use: just highlight a function in the Visual Studio IDE, hit <F1> ... and it's usually pretty good about bringing up the man page, telling you what header and/or library you need, and discussing any compatibility issues.

If the function in question doesn't show up on MSDN (i.e. if that particular API isn't supported under Windows), then Google is your next stop. You're virtually certain to find a Windows equivalent!

'Hope that helps .. PSM
 
Old 06-19-2009, 08:18 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,706
Blog Entries: 4

Rep: Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030
I'd suggest spending some "google time" looking over your various options. There are many ways to do cross-platform code and/or cross-platform conversions, so if you find yourself "thinking from scratch," it's time to pull-back and look around: your efforts would be redundant.
Quote:
Actum Ne Agas: "Do Not Do A Thing Already Done."
Look over the code and try to enumerate the Linux/Unix facilities that are being used in the code, how they are being used (particularly if threading and/or synchronization is involved), and so on ... all before you embark upon changing anything at all. Then, do your research.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the packet for unistd.h sys/types.h ? spank Linux - Newbie 3 03-03-2007 12:32 PM
LXer: Why you shouldn't wait for the perfect open source Windows-apps replacement LXer Syndicated Linux News 0 04-22-2006 08:21 PM
Is a Linux sys w/o any passwd's as secure as a microsoft windows sys w/no passwd? t3gah Linux - Security 4 04-22-2005 09:01 PM
wait() and signal() applies on which process ...? indian Programming 5 12-01-2004 03:43 PM
pthread , signal/wait ldamian Programming 3 07-31-2003 06:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration