Link to home
Start Free TrialLog in
Avatar of jtliew
jtliew

asked on

Migrating the C program from Unix to Win NT 4.0 !

programms : Borland C++ 5.0
source codes are written in C.

questions :
(1) Is there any GOOD Computing Book on migrating the Unix C programm to Win NT ?
(2) What are the precautions I have to take note off as this program(IN Unix) does serial and parallel ( low level interfacing) communications ?(how should i do it in WIN NT 4.0?)

points given : (1) 25
               (2) 50
 
Avatar of rmichels
rmichels

You may want to post this question in the Windows topic instead of here in C
Take a look at the Unix to NT porting FAQ: http://www.nentug.org/unix-to-nt/
It will depend a lot on the program. Graphics? Talking to hardware? Sockets? GUI? Threads?
There are at least a half dozen books and many articles on 'portable c'.   Do an web search and an amazon search to start with.

Some specific non obvious dependencies to watch for:
big endian/little endian byte alignment
direction of stack growth
Relative sizes of standard types and memory alignment of data
Dynamic memory coagulation and reuse after free
...
The first thing, though, is to make sure your sources completely pass the toughest lint tests you can find (i.e. Gimpel lint, ... and Unix lint), even if the programs are already working in your native environment.   This alone will save you hours-days of frustration.
It seems this is the right topic area indeed.
Avatar of jtliew

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of braveheart
braveheart

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial