From: Nelson R. <pal...@us...> - 2001-04-18 04:26:04
|
I've modified Line v0.4 to compile in Visual C 6.x without cygwin. It compiles, it runs, it has some problems. Problems: 1) I didn't know what to do with your log macros, so I commented them out. MSVC didn't like them. 2) I had to link getopt.c, getopt1.c and include getopt.h along with LINE with a few modifications in order to use getopt w/out cygwin. In fact, if you read getopt.c in the Line/src/posix directory you'll see that the glibc authors intended it to be linked to code seperate from the library if a compiler didn't support it yet. 3) I wrote a wrapper for getpid to work in Win32. 4) I had to bypass the cygwin path conversion functions (I don't know what they do yet.) by doing a: linedir = strdup("."); for the -l=blah option. It defaults to the current directory if you use the -l option with any parameter. I'm not looking forward to making a replacement function. I don't have cygwin, but maybe someone could just extract this function out of cygwin and slip it in somewhere. 5) It runs fine but if you try to load a Linux ELF executable file you will see some errors relating to getrlimit and cygwin. I haven't tracked this down yet, but when I get more time I will. 6) The resulting executable is 130k compared to the 80k cygwin executable, this cannot be a good thing. The MSVC project files are included in the package, along with the getopt files and the modified LINE source. I haven't played with linexec or linelog yet so you'll have to use the originals in the same directory. The only source file that has changed is Line.c and log.h I've gone through and commented out every call to the log macros, please forgive me. I was much more interested in getting the thing to compile. ;-) A quick note on the getopt stuff: posix/getopt.c .. contains the code for getopt posix/getopt1.c .. contains a wrapper for getopt_long These were the filenames given by the glibc authors, it may be wise to keep them named in this way. They have been slightly modified so they would compile normally in Win32. This new version can be downloaded here: http://palisade.rm-f.net/line-0.41.zip Hope this is helpful. Sincerely, Nelson Rush "I will never let my schooling get in the way of my education." --Mark Twain |