[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    CRTDLL patch
From:       Jon Griffiths <jon_p_griffiths () yahoo ! com>
Date:       2000-09-22 13:43:45
[Download RAW message or body]

Hi All,

I have uploaded to WineHQ a patch for work I've done so far on
CRTDLL. This is my first Wine patch, so please have a look and let me
know if I've done something hideous! (especially breaking compiles
for bsd/solaris...). If no-one objects, I'll submit it in a couple of
days, and start submitting smaller patches after. This first patch is
very large mainly because once I started on the file i/o stuff I had
to implement a lot of functions before I could test it, and do better
than the current implementation.

The changes fall into a couple of areas:
-Implementing some simple functions, totally non-controversial.
-Restructuring into several files. Hopefully no-one minds this.
-Setting error status in all functions.
-Reimplimenting almost every file function to use the Win32 API.
 After some investigation I decided this was the only way to get a) 
 real compatability and b) the start of good winelib support. There
 are a few issues to deal with, see crtdll_file.c for some comments. 
 As of now though, all low level file calls except dup and dup2 are
 implemented, most stream functions are implemented (using the low
 level calls), append mode is working, and proper (read, not write)
 binary/text support won't be too hard.

The only files affected are in dlls/crtdll, so the patch can be
applied to any version of Wine from last month or two. Total number
of newly implemented functions is 53; another 20-odd were
reimplimented. I guess this takes CRTDLL completion to about 50%.

I have relied on recieved advice regarding shared data - namely that
each process will get its own copy of any data in the dll, and that
each thread of the process will share that data. There is no MT
locking, however everything is structured so that it could be added
fairly easily if desired (I'm still a fan of doing this, maybe off by
default, with a configure switch to turn it on).

Along with the diff is a test harness. I have tested most calls using
crtdll.dll from 98SE and NT4. If someone has another version or knows
where I can get one, please let me know. To run it yourself, backup
winver.c in programs/, copy it over and rebuild (I'll make it into a
proper testharness RSN).

I have also tested with lcc and can compile,link and run a crt-using
program with the command line tools. I get further with the GUI
"wedit" too: when spawning make for example, the child correctly
inherits stderr and returns its output to the results window. Sadly
the make command itself fails for some reason as yet undiscovered...

The patch is called "CRTDLL Updates", it should have a .tar.bz2
extension, but I had a slight misunderstanding with the patch submit
form :-)

Heres the Changelog:
   * dlls/crtdll: crtdll_main.c, crtdll.h, crtdll.spec, Makefile.in,
     mbstring.c, wcstring.c, +crtdll_file.c, +crtdll_str.c,
     +crtdll_mem.c, +crtdll_exit.c, +crtdll_spawn.c, +crtdll_dir.c,
     +crtdll_time.c
     Jon Griffiths <jon_p_griffiths@yahoo.com>
     - Implement around 50 functions
     - Reimpliment file I/O using Win32 calls
     - Set errno/doserrno in most calls

Cheers,
Jon

=====
"May their negative actions ripen upon me. And may all my virtues ripen upon \
them."-Nagarjuna, on Compassion

"If it could be talked about, everybody would have told their brother."-Chuang Tzu, \
on Tao

tntjpgriff@tsnxt.co.uk , jon_p_griffiths@yahoo.com

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic