server/ include files

Andreas Mohr a.mohr at mailto.de
Sun Mar 11 13:35:09 CST 2001


Hi all,

I removed many, many includes from the files in the server/ directory.
I thought that this could fix the sig11 reported on semaphore.c
(several sig11s seem to happen due to excessive #include:ing),
and I thought that I could extend this to the whole server/ dir.
So I did it.

*BSD and other people: test this patch or don't complain later !!
(i.e.: tested on Linux only)

Andreas Mohr
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: server/async.c
===================================================================
RCS file: /home/wine/wine/server/async.c,v
retrieving revision 1.6
diff -u -r1.6 async.c
--- server/async.c	2001/01/07 21:46:17	1.6
+++ server/async.c	2001/03/11 15:59:13
@@ -16,26 +16,13 @@
 #include <assert.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
 #include <errno.h>
 #ifdef HAVE_SYS_ERRNO_H
 #include <sys/errno.h>
 #endif
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
 #include <unistd.h>
-#include <utime.h>
-#include <termios.h>
-#include <sys/ioctl.h>
 
-#include "winerror.h"
-#include "winbase.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct async 
Index: server/atom.c
===================================================================
RCS file: /home/wine/wine/server/atom.c,v
retrieving revision 1.7
diff -u -r1.7 atom.c
--- server/atom.c	2000/12/19 02:12:46	1.7
+++ server/atom.c	2001/03/11 15:59:13
@@ -6,12 +6,10 @@
  */
 
 #include <assert.h>
-#include <stdlib.h>
 #include <stdio.h>
 
 #include "unicode.h"
 #include "request.h"
-#include "object.h"
 #include "process.h"
 
 #define HASH_SIZE     37
Index: server/change.c
===================================================================
RCS file: /home/wine/wine/server/change.c,v
retrieving revision 1.9
diff -u -r1.9 change.c
--- server/change.c	2001/01/05 04:08:08	1.9
+++ server/change.c	2001/03/11 15:59:13
@@ -6,12 +6,8 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 
-#include "winnt.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct change
Index: server/console.c
===================================================================
RCS file: /home/wine/wine/server/console.c,v
retrieving revision 1.25
diff -u -r1.25 console.c
--- server/console.c	2001/02/16 19:08:19	1.25
+++ server/console.c	2001/03/11 15:59:13
@@ -10,27 +10,18 @@
 #include "config.h"
 
 #include <assert.h>
-#include <fcntl.h>
-#include <signal.h>
 #include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
 #ifdef HAVE_SYS_ERRNO_H
 #include <sys/errno.h>
 #endif
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
 #include <unistd.h>
 
-#include "winnt.h"
 #include "winbase.h"
 #include "wincon.h"
 
 #include "handle.h"
 #include "process.h"
-#include "thread.h"
 #include "request.h"
 
 struct screen_buffer;
Index: server/context_i386.c
===================================================================
RCS file: /home/wine/wine/server/context_i386.c,v
retrieving revision 1.15
diff -u -r1.15 context_i386.c
--- server/context_i386.c	2000/11/29 20:04:09	1.15
+++ server/context_i386.c	2001/03/11 15:59:14
@@ -8,12 +8,10 @@
 
 #ifdef __i386__
 
-#include <assert.h>
 #include <errno.h>
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
 #endif
-#include <unistd.h>
 #ifdef HAVE_SYS_PTRACE_H
 # include <sys/ptrace.h>
 #endif
@@ -24,8 +22,6 @@
 # include <sys/user.h>
 #endif
 
-#include "winbase.h"
-#include "thread.h"
 #include "request.h"
 
 #ifndef PTRACE_PEEKUSER
Index: server/debugger.c
===================================================================
RCS file: /home/wine/wine/server/debugger.c,v
retrieving revision 1.29
diff -u -r1.29 debugger.c
--- server/debugger.c	2001/03/05 19:34:21	1.29
+++ server/debugger.c	2001/03/11 15:59:14
@@ -5,14 +5,10 @@
  */
 
 #include <assert.h>
-#include <string.h>
 #include <stdio.h>
 
-#include "winbase.h"
-
 #include "handle.h"
 #include "process.h"
-#include "thread.h"
 #include "request.h"
 
 enum debug_event_state { EVENT_QUEUED, EVENT_SENT, EVENT_CONTINUED };
Index: server/device.c
===================================================================
RCS file: /home/wine/wine/server/device.c,v
retrieving revision 1.9
diff -u -r1.9 device.c
--- server/device.c	2001/01/05 04:08:08	1.9
+++ server/device.c	2001/03/11 15:59:14
@@ -11,15 +11,9 @@
  */
 
 #include <assert.h>
-#include <fcntl.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
-#include "winbase.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct device
Index: server/event.c
===================================================================
RCS file: /home/wine/wine/server/event.c,v
retrieving revision 1.19
diff -u -r1.19 event.c
--- server/event.c	2001/01/05 04:08:08	1.19
+++ server/event.c	2001/03/11 15:59:14
@@ -6,12 +6,8 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 
-#include "winnt.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct event
Index: server/file.c
===================================================================
RCS file: /home/wine/wine/server/file.c,v
retrieving revision 1.38
diff -u -r1.38 file.c
--- server/file.c	2001/03/01 22:13:50	1.38
+++ server/file.c	2001/03/11 15:59:15
@@ -9,24 +9,16 @@
 #include <assert.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
 #ifdef HAVE_SYS_ERRNO_H
 #include <sys/errno.h>
 #endif
 #include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
 #include <unistd.h>
 #include <utime.h>
 
 #include "winerror.h"
-#include "winbase.h"
 
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct file
Index: server/handle.c
===================================================================
RCS file: /home/wine/wine/server/handle.c,v
retrieving revision 1.15
diff -u -r1.15 handle.c
--- server/handle.c	2001/01/05 04:08:08	1.15
+++ server/handle.c	2001/03/11 15:59:15
@@ -6,15 +6,9 @@
 
 #include <assert.h>
 #include <limits.h>
-#include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
 
-#include "winbase.h"
-
-#include "handle.h"
 #include "process.h"
-#include "thread.h"
 #include "request.h"
 
 struct handle_entry
Index: server/main.c
===================================================================
RCS file: /home/wine/wine/server/main.c,v
retrieving revision 1.20
diff -u -r1.20 main.c
--- server/main.c	2001/01/11 22:28:35	1.20
+++ server/main.c	2001/03/11 15:59:15
@@ -4,17 +4,10 @@
  * Copyright (C) 1998 Alexandre Julliard
  */
 
-#include <assert.h>
-#include <ctype.h>
-#include <fcntl.h>
 #include <signal.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
 #include <unistd.h>
 
-#include "object.h"
-#include "thread.h"
 #include "request.h"
 
 /* command-line options */
Index: server/mapping.c
===================================================================
RCS file: /home/wine/wine/server/mapping.c,v
retrieving revision 1.22
diff -u -r1.22 mapping.c
--- server/mapping.c	2001/02/20 23:45:08	1.22
+++ server/mapping.c	2001/03/11 15:59:16
@@ -6,15 +6,11 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 
 #include "config.h"
-#include "winnt.h"
-#include "winbase.h"
 
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct mapping
Index: server/mutex.c
===================================================================
RCS file: /home/wine/wine/server/mutex.c,v
retrieving revision 1.17
diff -u -r1.17 mutex.c
--- server/mutex.c	2001/01/05 04:08:08	1.17
+++ server/mutex.c	2001/03/11 15:59:16
@@ -6,12 +6,8 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 
-#include "winnt.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct mutex
Index: server/object.c
===================================================================
RCS file: /home/wine/wine/server/object.c,v
retrieving revision 1.18
diff -u -r1.18 object.c
--- server/object.c	2000/12/19 02:12:46	1.18
+++ server/object.c	2001/03/11 15:59:16
@@ -7,9 +7,7 @@
 
 #include <assert.h>
 #include <limits.h>
-#include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
 #include <unistd.h>
 
 #include "thread.h"
Index: server/pipe.c
===================================================================
RCS file: /home/wine/wine/server/pipe.c,v
retrieving revision 1.17
diff -u -r1.17 pipe.c
--- server/pipe.c	2001/01/05 04:08:08	1.17
+++ server/pipe.c	2001/03/11 15:59:16
@@ -7,23 +7,10 @@
 #include "config.h"
 
 #include <assert.h>
-#include <fcntl.h>
-#include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_SYS_ERRNO_H
-#include <sys/errno.h>
-#endif
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
 #include <unistd.h>
 
-#include "winbase.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 enum side { READ_SIDE, WRITE_SIDE };
Index: server/process.c
===================================================================
RCS file: /home/wine/wine/server/process.c,v
retrieving revision 1.68
diff -u -r1.68 process.c
--- server/process.c	2001/03/01 22:13:50	1.68
+++ server/process.c	2001/03/11 15:59:17
@@ -7,24 +7,14 @@
 #include "config.h"
 
 #include <assert.h>
-#include <errno.h>
-#include <limits.h>
-#include <signal.h>
-#include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
 #include <unistd.h>
 
-#include "winbase.h"
-#include "winnt.h"
-
 #include "handle.h"
 #include "process.h"
-#include "thread.h"
 #include "request.h"
 
 /* process structure */
Index: server/ptrace.c
===================================================================
RCS file: /home/wine/wine/server/ptrace.c,v
retrieving revision 1.10
diff -u -r1.10 ptrace.c
--- server/ptrace.c	2000/11/29 20:04:09	1.10
+++ server/ptrace.c	2001/03/11 15:59:17
@@ -6,18 +6,14 @@
 
 #include "config.h"
 
-#include <assert.h>
 #include <errno.h>
 #include <stdio.h>
-#include <signal.h>
-#include <sys/types.h>
 #ifdef HAVE_SYS_PTRACE_H
 # include <sys/ptrace.h>
 #endif
 #ifdef HAVE_SYS_WAIT_H
 # include <sys/wait.h>
 #endif
-#include <unistd.h>
 
 #include "process.h"
 #include "thread.h"
Index: server/queue.c
===================================================================
RCS file: /home/wine/wine/server/queue.c,v
retrieving revision 1.3
diff -u -r1.3 queue.c
--- server/queue.c	2001/01/05 04:08:08	1.3
+++ server/queue.c	2001/03/11 15:59:17
@@ -4,12 +4,9 @@
  * Copyright (C) 2000 Alexandre Julliard
  */
 
-#include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 #include "handle.h"
-#include "thread.h"
 #include "process.h"
 #include "request.h"
 
Index: server/registry.c
===================================================================
RCS file: /home/wine/wine/server/registry.c,v
retrieving revision 1.32
diff -u -r1.32 registry.c
--- server/registry.c	2001/03/05 19:34:21	1.32
+++ server/registry.c	2001/03/11 15:59:19
@@ -11,24 +11,20 @@
  */
 
 #include <assert.h>
-#include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdlib.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <pwd.h>
-#include "object.h"
+
 #include "handle.h"
 #include "request.h"
 #include "unicode.h"
 
-#include "winbase.h"
 #include "winreg.h"
-#include "winnt.h" /* registry definitions */
 
 
 /* a registry key */
Index: server/request.c
===================================================================
RCS file: /home/wine/wine/server/request.c,v
retrieving revision 1.51
diff -u -r1.51 request.c
--- server/request.c	2001/03/08 01:16:42	1.51
+++ server/request.c	2001/03/11 15:59:19
@@ -8,29 +8,15 @@
 
 #include <assert.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <pwd.h>
-#include <signal.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
-#include <sys/uio.h>
 #include <sys/un.h>
-#include <unistd.h>
 
-#include "winnt.h"
 #include "winbase.h"
-#include "wincon.h"
-#include "thread.h"
 #include "process.h"
-#include "server.h"
 #define WANT_REQUEST_HANDLERS
 #include "request.h"
 #include "wine/port.h"
Index: server/select.c
===================================================================
RCS file: /home/wine/wine/server/select.c,v
retrieving revision 1.12
diff -u -r1.12 select.c
--- server/select.c	2000/01/25 01:40:27	1.12
+++ server/select.c	2001/03/11 15:59:19
@@ -5,17 +5,9 @@
  */
 
 #include <assert.h>
-#include <errno.h>
 #include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/poll.h>
-#include <sys/time.h>
-#include <sys/types.h>
 #include <unistd.h>
 
-#include "object.h"
 #include "thread.h"
 
 
Index: server/semaphore.c
===================================================================
RCS file: /home/wine/wine/server/semaphore.c,v
retrieving revision 1.16
diff -u -r1.16 semaphore.c
--- server/semaphore.c	2001/01/05 04:08:08	1.16
+++ server/semaphore.c	2001/03/11 15:59:20
@@ -6,12 +6,8 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 
-#include "winnt.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct semaphore
Index: server/serial.c
===================================================================
RCS file: /home/wine/wine/server/serial.c,v
retrieving revision 1.7
diff -u -r1.7 serial.c
--- server/serial.c	2001/01/05 04:08:08	1.7
+++ server/serial.c	2001/03/11 15:59:20
@@ -14,26 +14,10 @@
 #include <assert.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef HAVE_SYS_ERRNO_H
-#include <sys/errno.h>
-#endif
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <time.h>
 #include <unistd.h>
-#include <utime.h>
 #include <termios.h>
-#include <sys/ioctl.h>
 
-#include "winerror.h"
-#include "winbase.h"
-
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 static void serial_dump( struct object *obj, int verbose );
Index: server/snapshot.c
===================================================================
RCS file: /home/wine/wine/server/snapshot.c,v
retrieving revision 1.10
diff -u -r1.10 snapshot.c
--- server/snapshot.c	2001/01/05 04:08:08	1.10
+++ server/snapshot.c	2001/03/11 15:59:20
@@ -8,14 +8,12 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 #include "windef.h"
 #include "tlhelp32.h"
 
 #include "handle.h"
 #include "process.h"
-#include "thread.h"
 #include "request.h"
 
 
Index: server/sock.c
===================================================================
RCS file: /home/wine/wine/server/sock.c,v
retrieving revision 1.17
diff -u -r1.17 sock.c
--- server/sock.c	2001/01/05 04:08:08	1.17
+++ server/sock.c	2001/03/11 15:59:20
@@ -10,33 +10,17 @@
 #include "config.h"
 
 #include <assert.h>
-#include <fcntl.h>
 #include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
 #ifdef HAVE_SYS_ERRNO_H
 # include <sys/errno.h>
 #endif
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-#include <sys/ioctl.h>
 #ifdef HAVE_SYS_FILIO_H
 # include <sys/filio.h>
 #endif
-#include <time.h>
-#include <unistd.h>
 
 #include "winerror.h"
-#include "winbase.h"
 #include "winsock2.h"
-#include "process.h"
 #include "handle.h"
-#include "thread.h"
 #include "request.h"
 
 struct sock
Index: server/thread.c
===================================================================
RCS file: /home/wine/wine/server/thread.c,v
retrieving revision 1.64
diff -u -r1.64 thread.c
--- server/thread.c	2001/03/08 01:16:42	1.64
+++ server/thread.c	2001/03/11 15:59:21
@@ -10,18 +10,11 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
-#include <stdarg.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
-#include <sys/types.h>
 #include <unistd.h>
-#include <stdarg.h>
-
-#include "winbase.h"
 
 #include "handle.h"
 #include "process.h"
Index: server/timer.c
===================================================================
RCS file: /home/wine/wine/server/timer.c,v
retrieving revision 1.10
diff -u -r1.10 timer.c
--- server/timer.c	2001/01/06 01:48:52	1.10
+++ server/timer.c	2001/03/11 15:59:21
@@ -6,11 +6,7 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <sys/types.h>
 
-#include "winnt.h"
 #include "handle.h"
 #include "request.h"
 
Index: server/trace.c
===================================================================
RCS file: /home/wine/wine/server/trace.c,v
retrieving revision 1.89
diff -u -r1.89 trace.c
--- server/trace.c	2001/03/08 01:16:42	1.89
+++ server/trace.c	2001/03/11 15:59:22
@@ -4,14 +4,9 @@
  * Copyright (C) 1999 Alexandre Julliard
  */
 
-#include <ctype.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/uio.h>
 
 #include "config.h"
-#include "winsock2.h"
-#include "winnt.h"
 #include "winbase.h"
 #include "wincon.h"
 #include "request.h"
Index: server/unicode.c
===================================================================
RCS file: /home/wine/wine/server/unicode.c,v
retrieving revision 1.2
diff -u -r1.2 unicode.c
--- server/unicode.c	2000/07/25 21:01:59	1.2
+++ server/unicode.c	2001/03/11 15:59:22
@@ -4,7 +4,6 @@
  * Copyright (C) 1999 Alexandre Julliard
  */
 
-#include <ctype.h>
 #include <stdio.h>
 
 #include "unicode.h"


More information about the wine-patches mailing list