OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls
written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all
evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of UNIX and if Unix call has 3 arguments and NT has more than 3
critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards

GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Im not sure what you mean by sycalls port… you need to port an application for which you have source code , or you need to ensure binary level comaptibility ( i.e load and exec on NT a unic native binary ?)

In the first case , is simple , get a NT native API reference and replace every Unix syscall with it’s NT counterpart , forget 1:1 mapping , it would be better to wrap your code into a wrapper function which takes same parameter and return types as unix syscall , but it uses native Nt and / or other API’s to ensure same functionality. Be carefull at fork() family , a correct implementation of this is a bitch in NT.

----- Original Message -----
From: GVSN Naik
To: NT Developers Interest List
Sent: Friday, June 01, 2001 9:49 AM
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all evident UNIX to NT conversions, Pls suggest how to write that NT call in place of UNIX and if Unix call has 3 arguments and NT has more than 3 critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Or just use the cygnus libraries, which already map just about the
entire unix api into win32. www.cygnus.com. Should be a simple
recompile.

Eagerly awaiting my message rejected event.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of danp
Sent: Friday, June 01, 2001 3:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Im not sure what you mean by sycalls port… you need to port an
application for which you have source code , or you need to ensure
binary level comaptibility ( i.e load and exec on NT a unic native
binary ?)

In the first case , is simple , get a NT native API reference and
replace every Unix syscall with it’s NT counterpart , forget 1:1 mapping
, it would be better to wrap your code into a wrapper function which
takes same parameter and return types as unix syscall , but it uses
native Nt and / or other API’s to ensure same functionality. Be carefull
at fork() family , a correct implementation of this is a bitch in NT.

----- Original Message -----
From: GVSN mailto:xxxxx Naik
To: NT Developers Interest List mailto:xxxxx
Sent: Friday, June 01, 2001 9:49 AM
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS
calls written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT
call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified
all evident UNIX to NT conversions, Pls suggest how to write that NT
call in place of UNIX and if Unix call has 3 arguments and NT has more
than 3 critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards

GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@tellink.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx></mailto:xxxxx>

Thanks Mark,

If I need to develop a wrapper kind of thing for NT (to port Unix
application) Pls let me know what I need to do?

Good Day
Naik

-----Original Message-----
From: Mark Roddy [mailto:xxxxx@hollistech.com]
Sent: Friday, June 01, 2001 4:23 PM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Or just use the cygnus libraries, which already map just about the entire
unix api into win32. www.cygnus.com http: . Should be a
simple recompile.

Eagerly awaiting my message rejected event.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of danp
Sent: Friday, June 01, 2001 3:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Im not sure what you mean by sycalls port… you need to port an
application for which you have source code , or you need to ensure binary
level comaptibility ( i.e load and exec on NT a unic native binary ?)

In the first case , is simple , get a NT native API reference and replace
every Unix syscall with it’s NT counterpart , forget 1:1 mapping , it would
be better to wrap your code into a wrapper function which takes same
parameter and return types as unix syscall , but it uses native Nt and / or
other API’s to ensure same functionality. Be carefull at fork() family , a
correct implementation of this is a bitch in NT.

----- Original Message -----
From: GVSN Naik mailto:xxxxx
To: NT Developers mailto:xxxxx Interest List
Sent: Friday, June 01, 2001 9:49 AM
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls
written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all
evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of UNIX and if Unix call has 3 arguments and NT has more than 3
critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards

GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@tellink.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx></mailto:xxxxx></http:>

The cygnus libraries are GPL - they come with source code. Just download
them and start reading the sources.

-----Original Message-----
From: GVSN Naik [mailto:xxxxx@dcmtech.co.in]
Sent: Friday, June 01, 2001 7:14 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Thanks Mark,

If I need to develop a wrapper kind of thing for NT (to port Unix
application) Pls let me know what I need to do?

Good Day
Naik

-----Original Message-----
From: Mark Roddy [mailto:xxxxx@hollistech.com]
Sent: Friday, June 01, 2001 4:23 PM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Or just use the cygnus libraries, which already map just about the entire
unix api into win32. www.cygnus.com http: . Should be a
simple recompile.

Eagerly awaiting my message rejected event.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of danp
Sent: Friday, June 01, 2001 3:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Im not sure what you mean by sycalls port… you need to port an
application for which you have source code , or you need to ensure binary
level comaptibility ( i.e load and exec on NT a unic native binary ?)

In the first case , is simple , get a NT native API reference and replace
every Unix syscall with it’s NT counterpart , forget 1:1 mapping , it would
be better to wrap your code into a wrapper function which takes same
parameter and return types as unix syscall , but it uses native Nt and / or
other API’s to ensure same functionality. Be carefull at fork() family , a
correct implementation of this is a bitch in NT.

----- Original Message -----
From: GVSN Naik mailto:xxxxx
To: NT Developers Interest List mailto:xxxxx
Sent: Friday, June 01, 2001 9:49 AM
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls
written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all
evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of UNIX and if Unix call has 3 arguments and NT has more than 3
critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards

GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@tellink.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx></mailto:xxxxx></http:>

Hi,
Can you be more specific ?
From what you descibe it is ipossible to convert 3 params into 5 params,
shouldn’t you agree ?
Regards,
Stas.
BTW this is of topic here !
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of GVSN Naik
Sent: Thursday, May 31, 2001 11:49 PM
To: NT Developers Interest List
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls
written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified
all evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of UNIX and if Unix call has 3 arguments and NT has more than 3
critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Actually, maybe it isn’t that out of topic. What I would do is to implement
a dll of Unix entry points, mapping each Unix call to NT OS calls as
appropriate. This will probably be mostly negotiable at Ring 3 level,
although there may be some odd call or another that will require escaping
into Ring 0 and doing it inside a special driver. This would keep your
source code more or less untouched: instead of converting the Unix call, you
just write code to implement it on top of the existing NT/2K OS API. Given
that the NT API is way more comprehensive than its Unix counterpart, this
shouldn’t be that hard to do. And then, again, when you really run into
trouble you can always punt to your device driver.

For example, you could map Unix processes to NT threads, signals to events
or mutexes, fork() to CreateThread(), and so on.

Maybe such a library is already available out there, somewhere ? Hope this
helps,

Alberto.

-----Original Message-----
From: Stas Desy [mailto:xxxxx@actcom.co.il]
Sent: Friday, June 01, 2001 1:16 PM
To: NT Developers Interest List
Subject: [ntdev] RE: OS call Porting

Hi,
Can you be more specific ?
From what you descibe it is ipossible to convert 3 params into 5 params,
shouldn’t you agree ?
Regards,
Stas.
BTW this is of topic here !

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of GVSN Naik
Sent: Thursday, May 31, 2001 11:49 PM
To: NT Developers Interest List
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls
written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all
evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of UNIX and if Unix call has 3 arguments and NT has more than 3
critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards

GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

As Mark already pointed out, the cygwin library has already done this, and
done it pretty well.

-----Original Message-----
From: Moreira, Alberto [mailto:xxxxx@compuware.com]
Sent: Friday, June 01, 2001 8:35 AM
To: NT Developers Interest List
Subject: [ntdev] RE: OS call Porting

[snip]

For example, you could map Unix processes to NT threads, signals to events
or mutexes, fork() to CreateThread(), and so on.

Maybe such a library is already available out there, somewhere ? Hope this
helps,

[snip]


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Replace all Sys call in ur own Wrapper function

My_Unix_Call ( );

Inside This Wrapper, call original Functionl.

My_Unix_Call ( )
{
#ifdef NT
Original_NT_Call ( ) ;
#else
Original_Unix_Call ( ) ;
#endif
}

If NT has more arguments then Unix try to pass default or equvelent Parameter.
for ex :
fopen in windows takes few parameters. But inside fopen it calls CreateFile only by passing default parameters.

If no functionality avilable in winnt then u write ur own and call inside wrapper function.

Hope this will give u some idea.

Regards,
Satish K.S

Hi all,
I am working on a application where I need to port some of basic OS calls written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all evident UNIX to NT conversions, Pls suggest how to write that NT call in place of UNIX and if Unix call has 3 arguments and NT has more than 3 critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@aalayance.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thank Satish,

I will proceed with replacing all SysCalls in a wrapper to port OS calls.
will get back, if I get any more doubts

thanks
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyogvihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009

-----Original Message-----
From: Satish [mailto:xxxxx@aalayance.com]
Sent: Saturday, June 02, 2001 10:55 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Replace all Sys call in ur own Wrapper function

My_Unix_Call ( );

Inside This Wrapper, call original Functionl.

My_Unix_Call ( )
{
#ifdef NT
Original_NT_Call ( ) ;
#else
Original_Unix_Call ( ) ;
#endif
}

If NT has more arguments then Unix try to pass default or equvelent
Parameter.
for ex :
fopen in windows takes few parameters. But inside fopen it calls CreateFile
only by passing default parameters.

If no functionality avilable in winnt then u write ur own and call inside
wrapper function.

Hope this will give u some idea.

Regards,
Satish K.S

Hi all,
I am working on a application where I need to port some of basic OS calls
written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all
evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of UNIX and if Unix call has 3 arguments and NT has more than 3
critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards

GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@aalayance.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Alberto,
I must agree, you can do it this way. Furthermore, there are lots of
libraries that do just that (e.g. PWLib - Open H323 project by Equivalence -
http://www.openh323.org/ this does it all: sync objecs, threads, gui, yopu
name it).
Hope this helps,
Stas
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Moreira, Alberto
Sent: Friday, June 01, 2001 8:35 AM
To: NT Developers Interest List
Subject: [ntdev] RE: OS call Porting

Actually, maybe it isn’t that out of topic. What I would do is to
implement a dll of Unix entry points, mapping each Unix call to NT OS calls
as appropriate. This will probably be mostly negotiable at Ring 3 level,
although there may be some odd call or another that will require escaping
into Ring 0 and doing it inside a special driver. This would keep your
source code more or less untouched: instead of converting the Unix call, you
just write code to implement it on top of the existing NT/2K OS API. Given
that the NT API is way more comprehensive than its Unix counterpart, this
shouldn’t be that hard to do. And then, again, when you really run into
trouble you can always punt to your device driver.

For example, you could map Unix processes to NT threads, signals to events
or mutexes, fork() to CreateThread(), and so on.

Maybe such a library is already available out there, somewhere ? Hope this
helps,

Alberto.
-----Original Message-----
From: Stas Desy [mailto:xxxxx@actcom.co.il]
Sent: Friday, June 01, 2001 1:16 PM
To: NT Developers Interest List
Subject: [ntdev] RE: OS call Porting

Hi,
Can you be more specific ?
From what you descibe it is ipossible to convert 3 params into 5 params,
shouldn’t you agree ?
Regards,
Stas.
BTW this is of topic here !
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of GVSN Naik
Sent: Thursday, May 31, 2001 11:49 PM
To: NT Developers Interest List
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS
calls written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT
call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I
identified all evident UNIX to NT conversions, Pls suggest how to write that
NT call in place of UNIX and if Unix call has 3 arguments and NT has more
than 3 critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

MessageCygnus implementation of fork() is very ineffective - they copy the whole address space.
I would not advice using Cygnus in any serious product.

Max
----- Original Message -----
From: Mark Roddy
To: NT Developers Interest List
Sent: Friday, June 01, 2001 2:52 PM
Subject: [ntdev] Re: OS call Porting

Or just use the cygnus libraries, which already map just about the entire unix api into win32. www.cygnus.com. Should be a simple recompile.

Eagerly awaiting my message rejected event.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of danp
Sent: Friday, June 01, 2001 3:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Im not sure what you mean by sycalls port… you need to port an application for which you have source code , or you need to ensure binary level comaptibility ( i.e load and exec on NT a unic native binary ?)

In the first case , is simple , get a NT native API reference and replace every Unix syscall with it’s NT counterpart , forget 1:1 mapping , it would be better to wrap your code into a wrapper function which takes same parameter and return types as unix syscall , but it uses native Nt and / or other API’s to ensure same functionality. Be carefull at fork() family , a correct implementation of this is a bitch in NT.

----- Original Message -----
From: GVSN Naik
To: NT Developers Interest List
Sent: Friday, June 01, 2001 9:49 AM
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls written in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all evident UNIX to NT conversions, Pls suggest how to write that NT call in place of UNIX and if Unix call has 3 arguments and NT has more than 3 critical argument for the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009


You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@tellink.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Isn’t that exactly what fork() does on Unix though ?
Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Saturday, June 02, 2001 5:13 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Cygnus implementation of fork() is very ineffective - they copy the whole address
space.
I would not advice using Cygnus in any serious product.

Max
----- Original Message -----
From: Mark Roddy
To: NT Developers Interest List
Sent: Friday, June 01, 2001 2:52 PM
Subject: [ntdev] Re: OS call Porting

Or just use the cygnus libraries, which already map just about the entire unix api
into win32. www.cygnus.com. Should be a simple recompile.

Eagerly awaiting my message rejected event.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On
Behalf Of danp
Sent: Friday, June 01, 2001 3:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: OS call Porting

Im not sure what you mean by sycalls port… you need to port an application for
which you have source code , or you need to ensure binary level comaptibility (
i.e load and exec on NT a unic native binary ?)

In the first case , is simple , get a NT native API reference and replace every
Unix syscall with it’s NT counterpart , forget 1:1 mapping , it would be better to
wrap your code into a wrapper function which takes same parameter and return types
as unix syscall , but it uses native Nt and / or other API’s to ensure same
functionality. Be carefull at fork() family , a correct implementation of this is
a bitch in NT.

----- Original Message -----
From: GVSN Naik
To: NT Developers Interest List
Sent: Friday, June 01, 2001 9:49 AM
Subject: [ntdev] OS call Porting

Hi all,
I am working on a application where I need to port some of basic OS calls written
in UNIX to NT, say for example

my application ( )

{
my_UNIX_call () // This call need to convert in to equivalent NT call
}

I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified all
evident UNIX to NT conversions, Pls suggest how to write that NT call in place of
UNIX and if Unix call has 3 arguments and NT has more than 3 critical argument for
the said call, How to map??

Pls suggest how to port those calls. Waiting for your prompt response

regards
GVSN Naik
Member of DCM Technologies Ltd,
125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
Tel : 91-124-6398001 Fax : 91-124-6398009

You are currently subscribed to ntdev as: danp@jb.rdsor.ro
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@tellink.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@ultrabac.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

UNIX fork() uses copy-on-write.
NT’s MiCloneProcessAddressSpace used by POSIX subsystem to do fork() - too.
Cygnus (last time I saw it) stupidly copies all of the code and data.

Max

----- Original Message -----
From: “Paul Bunn”
To: “NT Developers Interest List”
Sent: Saturday, June 02, 2001 8:16 PM
Subject: [ntdev] Re: OS call Porting

> Isn’t that exactly what fork() does on Unix though ?
> Regards,
>
> Paul Bunn, UltraBac.com, 425-644-6000
> Microsoft MVP - WindowsNT/2000
> http://www.ultrabac.com
>
> -----Original Message-----
> From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
> Sent: Saturday, June 02, 2001 5:13 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: OS call Porting
>
>
> Cygnus implementation of fork() is very ineffective - they copy the whole
address
> space.
> I would not advice using Cygnus in any serious product.
>
> Max
> ----- Original Message -----
> From: Mark Roddy
> To: NT Developers Interest List
> Sent: Friday, June 01, 2001 2:52 PM
> Subject: [ntdev] Re: OS call Porting
>
>
> Or just use the cygnus libraries, which already map just about the entire
unix api
> into win32. www.cygnus.com. Should be a simple recompile.
>
> Eagerly awaiting my message rejected event.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On
> Behalf Of danp
> Sent: Friday, June 01, 2001 3:11 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: OS call Porting
>
>
> Im not sure what you mean by sycalls port… you need to port an
application for
> which you have source code , or you need to ensure binary level
comaptibility (
> i.e load and exec on NT a unic native binary ?)
>
> In the first case , is simple , get a NT native API reference and replace
every
> Unix syscall with it’s NT counterpart , forget 1:1 mapping , it would be
better to
> wrap your code into a wrapper function which takes same parameter and
return types
> as unix syscall , but it uses native Nt and / or other API’s to ensure
same
> functionality. Be carefull at fork() family , a correct implementation of
this is
> a bitch in NT.
>
>
> ----- Original Message -----
> From: GVSN Naik
> To: NT Developers Interest List
> Sent: Friday, June 01, 2001 9:49 AM
> Subject: [ntdev] OS call Porting
>
>
> Hi all,
> I am working on a application where I need to port some of basic OS calls
written
> in UNIX to NT, say for example
>
> my application ( )
>
> {
> my_UNIX_call () // This call need to convert in to equivalent NT call
> }
>
> I need to convert my_UNIX_call ( ) to appropriate NT calls, I identified
all
> evident UNIX to NT conversions, Pls suggest how to write that NT call in
place of
> UNIX and if Unix call has 3 arguments and NT has more than 3 critical
argument for
> the said call, How to map??
>
> Pls suggest how to port those calls. Waiting for your prompt response
>
> regards
> GVSN Naik
> Member of DCM Technologies Ltd,
> 125 Udyog Vihar Phase # 1 Gurgaon -122016 INDIA
> Tel : 91-124-6398001 Fax : 91-124-6398009
> —
> You are currently subscribed to ntdev as: danp@jb.rdsor.ro
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> —
> You are currently subscribed to ntdev as: xxxxx@tellink.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> —
> You are currently subscribed to ntdev as: xxxxx@ultrabac.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

xxxxx@storagecraft.com said:

NT’s MiCloneProcessAddressSpace used by POSIX subsystem to do fork() -
too. Cygnus (last time I saw it) stupidly copies all of the code and
data.

Cygwin doesn’t just work on NT.

Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>

xxxxx@storagecraft.com said:
> NT’s MiCloneProcessAddressSpace used by POSIX subsystem to
do fork() -
> too. Cygnus (last time I saw it) stupidly copies all of
the code and
> data.

Cygwin doesn’t just work on NT.

Good point.

At any rate I suggested cygwin not because it is the best ever most
efficient unix-win32 conversion library, but because: a) it works, b)
its free, c) it comes with source code, and d) I think the original
poster did not have a huge concern with performance, but was primarily
concerned with the mechanics of porting from unix to win32 with a
minimum of effort. Cygwin does exactly what he needs done. It remains
unclear if he understood that his work has already been done for him.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com