This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Porting Unix code to Windows 95 / Windows NT


-----BEGIN PGP SIGNED MESSAGE-----

On 28 Oct 98, at 8:47, Aldo Mazzilli wrote:

 ---------------------------------------------------------------------
> 
> 1) How can I get users and groups informations (/etc/passwd ,
> /etc/group)
> 
>  * mkpasswd returns error : 
>         "MKPASSWD.EXE is link to a missing exportation NETAPI32.DLL :
>                                      NetUserEnum
> 
>  * mkgroup
>         "MKGROUP.EXE is link to a missing exportation NETAPI32.DLL :
>                                      NetApiBufferFree
mkpasswd and mkgroup are not supported on win95. they only work on NT system

> ---------------------------------------------------------------------
> 
> 2b) Shell scripts execution
> 
>         $ ls -lisa test
> returns  198072740 2 -rw-r--r-- 1 500 everyone 2176 Oct 26 16:30 test and
> after $ chmod 777 test
>         $ ls -lisa
> always returns :
>         198072740 2 -rw-r--r-- 1 500 everyone 2176 Oct 26 16:30 test
> 
>         How can I execute my 'test' script shell without using './test' or
>         'sh test'
>
as far as i remember it is rather non obvious how files attributes are handles.
     - executing attribute is not native (not supported by win32)
     - thus ls assume that it can be executed according to the .exe extension.
     - in case of script, from bash shell  you can execute it directly if you have 
set the usual  "#!!/bin/sh"   first line in your script. 

> 
> 4) Which command can I use instead of 'more' or 'pg'
you should get 'less'  
 I think you can cet a native mingw32 implementation of less in one of the 
porters site (colin peters site is a good start)

> ---------------------------------------------------------------------
> 
> 5) gcc compiler :
> 
>         Which differences can I find between Solaris gcc 
>                 (version 2.7.2.3) and your gcc
> 
>         For example :
>                 Considering :        void main () 
>                                    {
>                                    return 0;      
>                                    }
> 
>                  gcc compilation returns
>                            warning: return type of 'main' is not int
> !!   
> 
>                 when SunOS gcc returns nothing
> 
>                 What can I do to avoid this correction :
> 
>                                      int main () 
>                                      {
>                                      return 0;      
>                                      }
> 
depend of which compiler you have. by default b19 has gcc 2.8.(0-1), but it is 
stronly adviced that you get egcs (last release 1.1)  which is the closest 
compiler to the C ansi standart. 
and "int main() { }" is one of the standardised  stuff. 
thus here the advice is that you get the egcs compiler for both platform your 
NT box and your sun one.
BTW if you code some C++ stuff the advice of getting egcs is almost 
compulsary, especially if you plan to use advance feature as exeption 
templates...

> ---------------------------------------------------------------------
> 
> 
> Sincerily,
you are welcome.



-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQB1AwUBNjgjxxsXRhWZlwGdAQHI4QMAk5+Nu8LSLUzXZdI79VJXW8AEvaEw1mK4
cTLydNnAaHsaVEYpTXmWTHImIAxsVX+MEm1b0AxgvMnuxwCz2unMl1f+Z/Pn8tPT
NtEmRUrWWPgYsf67YgSInlwxKrmv2rGg
=SDWr
-----END PGP SIGNATURE-----
//////////////////////////////////////////////////
//
// Stephane Cateland <cateland@adersa.asso.fr>
//
//   Adersa  10 rue de la croix Martre   
//   91873 Palaiseau cedex    FRANCE
//
//   Phone   [switchboard]   (33) 0 160 135 353
//   Fax                     (33) 0 169 200 563 
//
//////////////////////////////////////////////////
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]