Release 960114

Sun Jan 14 13:45:22 1996  Alexandre Julliard  <julliard@sunsite.unc.edu>

	* [configure.in]
	Added check for gcc strength-reduce bug.

	* [controls/listbox.c]
	Changed ListBoxDirectory() to use the new DOS file functions.

	* [controls/menu.c]
	Fixed parameters for DeleteMenu() call in ChangeMenu().

	* [debugger/stack.c]
	Also display current frame in back-trace.

	* [files/directory.c] [files/dos_fs.c] [files/drive.c] [files/file.c]
	Complete rewrite of the DOS file handling.
	Implemented per-task file handles.
	Removed default Z: drive; needs to be put explicitely in wine.ini
	if desired.

	* [loader/module.c]
	Fixed file descriptor leak in LoadModule().

	* [loader/task.c]
	Initialise PDB file handle table in TASK_CreateTask().
	Close file handles on task termination.
	Implemented SetErrorMode().

	* [misc/network.c]
	Fixed WNetGetConnection() to use GetDriveType().

	* [misc/xmalloc.c]
	Added function xstrdup().

	* [miscemu/int21.c]
	Many changes for new DOS file functions.

	* [miscemu/interrupts.c]
	Moved DOS_GetEquipment() function into INT_Int11Handler().

	* [windows/win.c]
	Bug fix: create system menu before sending WM_NCCREATE.

	* [*/*.c]
	Replaced strcasecmp and strncasecmp by lstrcmpi and lstrncmpi for
	better portability.

Sat Jan 13 16:13:02 1996  Jim Peterson <jspeter@birch.ee.vt.edu>

	* [include/wintypes.h]
	Added 'typedef HGLOBAL GOBALHANDLE;'.  This is not precisely in line
	with the true windows 'typedef HANDLE GLOBALHANDLE;', but I believe
	it should suffice.

	* [include/winsock.h]
	Added '#include <arpa/inet.h>' for various declarations.  '#ifdef'-ed
	out some old style internet address #define's.

	* [loader/task.c]
	Made MakeProcInstance() return first parameter #ifdef WINELIB32.
	Made FreeProcInstance() do nothing #ifdef WINELIB32.
	'#ifdef'-ed out TASK_AllocThunk(), as it was unused in WINELIB32.

	* [library/miscstubs.c]
	Made GetWndProcEntry16() return ACTIVATEAPP_callback() when called
	with name="ActivateAppProc".  This hardly seems correct, but it's my
	best guess as to how the emulator responds.

Sat Jan  6 17:57:45 1996  Martin von Loewis <loewis@informatik.hu-berlin.de>

	* [if1632/kernel32.spec][win32/process.c]
	WIN32_GetProcAddress, LoadLibraryA: new functions

	* [if1632/relay32.c]
	RELAY32_GetEntryPoint: Removed code to load PE DLLs

	* [include/pe_image.h][include/pe_exe.h]
	struct pe_data: new fields base_addr,load_addr,vma_size,pe_reloc
	struct PE_Reloc_Block: new structure

	* [loader/module.c]
	MODULE_RegisterModule: new function

	* [loader/pe_image.c]
	PE_FindExportedFunction,PE_GetProcAddress: new functions
	fixup_imports: expect struct w_files* now, fill dlls_to_init,
	               load PE DLLs
	do_relocations: new functions
	calc_vma_size: renamed from dump_table
	PE_LoadImage: use malloc to allocate memory for image
	PE_InitDLL: expect HMODULE
	PE_InitializeDLLs: new function

	* [loader/task.c]
	NE_InitializeDLLs: branch to PE_InitializeDLLs for PE modules
	GetExePtr: Accept PE modules

	* [misc/commdlg.c]
	FILEDLG_WMCommand: unpack WIN32 WM_COMMAND appropriately for WineLib

Thu Jan  4 11:36:21 1996  Manfred Weichel <Manfred.Weichel@mch.sni.de>

	* [misc/port.c]
	New file with usleep() function for SVR4.

	* [configure.in]
	Check for usleep() function.

Tue Jan 02 14:00:00 1996  Anand Kumria <akumria@ozemail.com.au>

	* [if1632/toolhelp.spec] [include/toolhelp.h]
	  [misc/user.c] [windows/message.c]
	Implement TOOLHELP.80 TimerCount. Fix GetTickCount.

	* [winsocket.c]
	Fixed ENOENT error.

	* [miscemu/dpmi.c]
	Implement DPMI Get Page Size (AX=0604, INT 31)

	* [memory/global.c]
	Implement TOOLHELP.72 GetMemManInfo.

Mon Jan  2 10:33:00 1996  Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk>

	* [if1632/callback.c]
	CallWindowProc() - When calling RELAY32_CallWindowProc, check
	whether lParam should be a SEGPTR, and if so convert it to one.

	* [if1632/gdi.spec] [if1632/kernel32.spec] [if1632/user32.spec]
	Numerous functions added, mostly calls to original (win16)
 	functions.  Note that some (many) of these are probably not
 	strictly correct, but with these additions freecell will at least
 	display its main window though it is garbled.

	* [if1632/winprocs.spec]
	Completely rewritten - all WndProcs now have win32 versions to
	help with the lparam SEGPTR fix in callback.c

	* [include/kernel32.h]
	LPTCSTR defined.

	* [include/peexe.h]
	Definition of PE_Export_Directory amended.

	* [include/resource32.h]
	New file.

	* [include/stackframe.h]
	Definition of MAKE_SEGPTR macro #ifdef'd out and replaced with
	prototype for replacement function in memory/selector.c which
	can operate on any given memory address. This is currently
	required for win32 support. It is a dreadful cludge, and will
	certainly slow down other programs. If you are not interested
	in win32 development you may wish to reverse this patch.

	* [include/windows.h]
	Definition of SW_SHOWDEFAULT added.

	* [loader/pe_image.c]
	Extensive rewrites of xmmap() fixup_imports().
	PE_LoadImage() - initialisation of bss added, extraction of
	module name fixed, initialisation of DLL added.
	PE_InitDLL() - now does something.
	PE_Win32CallToStart() - initialisation of TEB pointed to by
	fs added.
	PE_InitTEB() created to perform TEB initialisation.

	* [memory/selector.c] 
	New function MAKE_SEGPTR() - see include/stackframe.h above.

	* [misc/user32.c]
	USER32_RegisterClassA(), CreateWindowExA() memory allocation
	method changed. This is probably now unnecessary with the
	new MAKE_SEGPTR handling code.
	USER32_DefWndProcA() removed to win32/winprocs.c
	USER32_TranslateMessage added.

	* [tools/build.c]
	handling of win32 spec files changed to support gcc2.6.X
	this requires optimisations to be disabled.

	* [win32/resource.c] [win32/newfns.c] [win32/heap.c] [win32/winprocs.c]
	New files.

	* [win32/Makefile.in]
	New files heap.c, newfns.c, resource.c and winprocs.c added to build.

	* [win32/file.c]
	New function W32_SetHandleCount.

	* [win32/init.c]
	WIN32_GetModuleHandle() - now returns handle of running process
	if called with NULL.
	GetStartupInfoA() - set cbReserved2 to 0.

	* [win32/memory.c]
	VirtualAlloc() - set mmap() file parameter to -1 instead of 0 to make
	it work with FreeBSD. Also check for return value. Removed extra
	return.

	* [windows/winpos.c]
	ShowWindow() - SW_SHOWDEFAULT handling kludged in.
diff --git a/configure b/configure
index 704cc35..0689562 100755
--- a/configure
+++ b/configure
@@ -685,7 +685,6 @@
   test "${CFLAGS+set}" = set || CFLAGS="-g"
 fi
 
-test "x${GCC}" = "xyes" && CFLAGS="$CFLAGS -Wall -fno-strength-reduce"
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -701,7 +700,7 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 705 "configure"
+#line 704 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
@@ -715,7 +714,7 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 719 "configure"
+#line 718 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
@@ -821,7 +820,7 @@
 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 cat > conftest.$ac_ext <<EOF
-#line 825 "configure"
+#line 824 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
@@ -884,7 +883,7 @@
 ac_save_LIBS="$LIBS"
 LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 888 "configure"
+#line 887 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1003,7 +1002,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lICE  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1007 "configure"
+#line 1006 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1047,7 +1046,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1051 "configure"
+#line 1050 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1082,7 +1081,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1086 "configure"
+#line 1085 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1122,7 +1121,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1125 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1161,7 +1160,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1165 "configure"
+#line 1164 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1266,7 +1265,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-l$ac_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1270 "configure"
+#line 1269 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1389,7 +1388,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-li386  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1393 "configure"
+#line 1392 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1417,14 +1416,80 @@
 
 
 
-for ac_func in tcgetattr
+if test "x${GCC}" = "xyes"
+then
+  CFLAGS="$CFLAGS -Wall"
+  # If we cannot run a trivial program, we must be cross compiling.
+echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_cross=yes
+else
+cat > conftest.$ac_ext <<EOF
+#line 1432 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+eval $ac_link
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  ac_cv_c_cross=no
+else
+  ac_cv_c_cross=yes
+fi
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_cross" 1>&6
+cross_compiling=$ac_cv_c_cross
+
+  echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_gcc_strength_bug="yes"
+else
+cat > conftest.$ac_ext <<EOF
+#line 1457 "configure"
+#include "confdefs.h"
+
+int main(void) {
+  static int Array3;
+  unsigned int B = 3;
+  int i;
+  for(i=0; i<B; i++) Arrayi = i - 3;
+  exit( Array1 != -2 );
+}
+EOF
+eval $ac_link
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  ac_cv_c_gcc_strength_bug="no"
+else
+  ac_cv_c_gcc_strength_bug="yes"
+fi
+fi
+rm -fr conftest* 
+fi
+
+echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
+  if test "$ac_cv_c_gcc_strength_bug" = "yes"
+  then
+    CFLAGS="$CFLAGS -fno-strength-reduce"
+  fi
+fi
+
+
+for ac_func in tcgetattr usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1428 "configure"
+#line 1493 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1476,7 +1541,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1480 "configure"
+#line 1545 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
@@ -1509,7 +1574,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1513 "configure"
+#line 1578 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1564,7 +1629,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1568 "configure"
+#line 1633 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1633,38 +1698,12 @@
 
 fi
 
-# If we cannot run a trivial program, we must be cross compiling.
-echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
-if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_cross=yes
-else
-cat > conftest.$ac_ext <<EOF
-#line 1646 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-eval $ac_link
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  ac_cv_c_cross=no
-else
-  ac_cv_c_cross=yes
-fi
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_cross" 1>&6
-cross_compiling=$ac_cv_c_cross
-
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1668 "configure"
+#line 1707 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1686,7 +1725,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1690 "configure"
+#line 1729 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1704,7 +1743,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1747 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1725,7 +1764,7 @@
   :
 else
 cat > conftest.$ac_ext <<EOF
-#line 1729 "configure"
+#line 1768 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1760,7 +1799,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1764 "configure"
+#line 1803 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1896,6 +1935,7 @@
 controls/Makefile
 debugger/Makefile
 debugger/readline/Makefile
+files/Makefile
 if1632/Makefile
 ipc/Makefile
 library/Makefile
@@ -1967,6 +2007,7 @@
 controls/Makefile
 debugger/Makefile
 debugger/readline/Makefile
+files/Makefile
 if1632/Makefile
 ipc/Makefile
 library/Makefile