From: Dave B. <dbr...@sw...> - 2001-01-12 20:16:31
|
From: Jim Roy <ji...@ng...> >I am trying to compile an app that wants a routine called major(), >and apparently expects to find it in sys/sysmacros.h. I can't find >that header file in the mingw includes, or indeed, that function anywhere >in any of the mingw header files. I do not know for certain, but the routine may be used to determine the major device number under Unix style file systems, if this is true then there is no Windows equivalent and thus no such thing for mingw. >An allied problem seems to be the definition of macros for S_IFSOCK and >S_IFLNK, which the program expects to find in sys/stat.h > >These things all exist in /usr/include/sys, but not in the mingw versions. > >Can someone give me a shove in the right direction? The S_IFSOCK and S_IFLNK are the macros which help test for a socket and a symbolic link codes in the directory structure. Since Windows sockets are not part of the directory stucture and Windows has no symbolic directory links, there is no equivalent for mingw. Depending upon what the application is doing, these may not be necessary since whatever it is, it may not be possible under Windows. --Dave |
From: Paul G. <pga...@te...> - 2001-01-13 03:10:30
|
Hi folks, On 12 Jan 2001, at 17:17, the Illustrious Earnie Boyd wrote: > Jim Roy wrote: > > > > Hi list, > > > > I am trying to compile an app that wants a routine called > > major(), and apparently expects to find it in sys/sysmacros.h. > > I can't find that header file in the mingw includes, or indeed, > > that function anywhere in any of the mingw header files. > > > > An allied problem seems to be the definition of macros for > > S_IFSOCK and S_IFLNK, which the program expects to find in > > sys/stat.h > > > > These things all exist in /usr/include/sys, but not in the > > mingw versions. > > > > Can someone give me a shove in the right direction? > > > > You can't build POSIX programs with MinGW unless you port (read > modify heavily) the program. MinGW compiler is ANSI compliant > only. If you want POSIX stick with Cygwin. I agree with Earnie on this...especially if you are needing a quick and easy posix capability. NT4 does have a fully compliant Posix subsystem that few people seem to be aware of. In such cases, you can actually build Posix compatible apps for (and under NT4) for as long as the various and requisite posix utilities are available somewhere on your NT4 system. If you are using NT4, you might try enabling your Posix subsystem, and then simply adding the necessary/requisite headers and see what happens...Win9x/ME do not support Posix, and in such cases, something like Cygwin is your best bet. Peace, Paul G. > > Cheers, > Earnie. > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/lists/listinfo/mingw-users > Nothing real can be threatened. Nothing unreal exists. |