[DBGHELP]
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 21 Jan 2014 18:04:09 +0000 (18:04 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 21 Jan 2014 18:04:09 +0000 (18:04 +0000)
* Move some inclusions to the main header.
* Remove inclusions and definitions that already exist in the main header.
* Improve header inclusions.
CORE-7716

svn path=/trunk/; revision=61749

29 files changed:
reactos/dll/win32/dbghelp/coff.c
reactos/dll/win32/dbghelp/compat.c
reactos/dll/win32/dbghelp/cpu_arm.c
reactos/dll/win32/dbghelp/cpu_arm64.c
reactos/dll/win32/dbghelp/cpu_i386.c
reactos/dll/win32/dbghelp/cpu_ppc.c
reactos/dll/win32/dbghelp/cpu_x86_64.c
reactos/dll/win32/dbghelp/crc32.c
reactos/dll/win32/dbghelp/dbghelp.c
reactos/dll/win32/dbghelp/dbghelp_private.h
reactos/dll/win32/dbghelp/dwarf.c
reactos/dll/win32/dbghelp/dwarf.h
reactos/dll/win32/dbghelp/elf_module.c
reactos/dll/win32/dbghelp/image.c
reactos/dll/win32/dbghelp/image_private.h
reactos/dll/win32/dbghelp/macho_module.c
reactos/dll/win32/dbghelp/minidump.c
reactos/dll/win32/dbghelp/module.c
reactos/dll/win32/dbghelp/msc.c
reactos/dll/win32/dbghelp/path.c
reactos/dll/win32/dbghelp/pe_module.c
reactos/dll/win32/dbghelp/rosstubs.c
reactos/dll/win32/dbghelp/source.c
reactos/dll/win32/dbghelp/stabs.c
reactos/dll/win32/dbghelp/stack.c
reactos/dll/win32/dbghelp/storage.c
reactos/dll/win32/dbghelp/symbol.c
reactos/dll/win32/dbghelp/type.c
reactos/dll/win32/dbghelp/wdbgexts.h

index ea8a15f..6ab0b67 100644 (file)
  *     Add symbol size to internal symbol table.
  */
 
-#include <config.h>
-//#include "wine/port.h"
-
-#include <assert.h>
-//#include <stdlib.h>
-
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-//#include <stdarg.h>
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winternl.h"
-
-//#include "wine/exception.h"
-#include <wine/debug.h>
 #include "dbghelp_private.h"
-#include <wine/mscvpdb.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_coff);
 
index c940075..c9a49ca 100644 (file)
@@ -1,5 +1,3 @@
-#include <stdio.h>
-#include <stdarg.h>
 #include "dbghelp_private.h"
 
 void* __HeapAlloc(int heap, int flags, size_t size)
index 4deb909..1b561c6 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-//#include <assert.h>
-
-//#include "ntstatus.h"
-#define WIN32_NO_STATUS
 #include "dbghelp_private.h"
-//#include "winternl.h"
-#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index 235049d..87864af 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
 #include "dbghelp_private.h"
-#include "winternl.h"
-#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index f37f36f..88642e0 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-
-#ifndef DBGHELP_STATIC_LIB
-#include "ntstatus.h"
-#endif
-
 #include "dbghelp_private.h"
 
 #ifndef DBGHELP_STATIC_LIB
-#include "wine/winbase16.h"
-#include "winternl.h"
-#include "wine/debug.h"
+#include <wine/winbase16.h>
 #endif
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
index 56571c5..7543ef6 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
 #include "dbghelp_private.h"
-#include "winternl.h"
-#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index 2e73aa3..d3e2720 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
 #include "dbghelp_private.h"
-#include "winternl.h"
-#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index e1f604e..61eadde 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-#include "wine/port.h"
-
-#include <stdio.h>
-
 #include "dbghelp_private.h"
 
 /* Copyright (C) 1986 Gary S. Brown
index 0e63c14..ae4ea13 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-
 #include "dbghelp_private.h"
-#include "wdbgexts.h"
 
-#ifndef DBGHELP_STATIC_LIB
-#include "winerror.h"
-#include "psapi.h"
-#include "wine/debug.h"
-#include "winnls.h"
-#endif
+#include "wdbgexts.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index 2180fdd..de9fc63 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
+#include <config.h>
+
+#include <assert.h>
+#include <stdio.h>
+
+#ifdef HAVE_SYS_MMAN_H
+# include <sys/mman.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
 #define _INC_WINDOWS
 #define COM_NO_WINDOWS_H
 
-#include <stdarg.h>
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
 
 #ifndef DBGHELP_STATIC_LIB
+
+#include <wine/port.h>
+
+#include <ntstatus.h>
+#define WIN32_NO_STATUS
 #include <windef.h>
 #include <winbase.h>
 #include <winver.h>
+#include <winternl.h>
 #include <dbghelp.h>
 #include <objbase.h>
 #include <cvconst.h>
+#include <psapi.h>
+
+#include <wine/debug.h>
+#include <wine/mscvpdb.h>
 #include <wine/unicode.h>
-#else
+
+#else /* DBGHELP_STATIC_LIB */
+
 #include <string.h>
 #include "compat.h"
-#endif
 
-//#include "oaidl.h"
-//#include "winnls.h"
+#endif /* DBGHELP_STATIC_LIB */
+
 #include <wine/list.h>
 #include <wine/rbtree.h>
 
-
 /* #define USE_STATS */
 
 struct pool /* poor's man */
@@ -815,3 +840,5 @@ extern struct symt_pointer*
 extern struct symt_typedef*
                     symt_new_typedef(struct module* module, struct symt* ref, 
                                      const char* name) DECLSPEC_HIDDEN;
+
+#include "image_private.h"
index f25b0fa..cca040e 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define NONAMELESSUNION
-
-#include <config.h>
-
-//#include <sys/types.h>
-//#include <fcntl.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-//#include <limits.h>
-//#include <stdlib.h>
-//#include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-//#include <stdio.h>
-#include <assert.h>
-#include <stdarg.h>
+#include "dbghelp_private.h"
 
 #ifdef HAVE_ZLIB
 #include <zlib.h>
 #endif
 
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winuser.h"
-//#include "ole2.h"
-//#include "oleauto.h"
-
-#ifndef DBGHELP_STATIC_LIB
-#include <winternl.h>
-#include <wine/debug.h>
-#endif
-
-#include "dbghelp_private.h"
-#include "image_private.h"
-
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_dwarf);
 
 /* FIXME:
index b96eab7..147f0a4 100644 (file)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma once
+
 typedef enum dwarf_tag_e
 {
   DW_TAG_padding                        = 0x00,
index f8015c1..469b340 100644 (file)
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-#include "wine/port.h"
+#include "dbghelp_private.h"
 
 #if defined(__svr4__) || defined(__sun)
 #define __ELF__ 1
 #define _FILE_OFFSET_BITS 32
 #endif
 
-#include <assert.h>
-#include <stdio.h>
 #include <stdlib.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
 #include <fcntl.h>
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include "dbghelp_private.h"
-
-#include "image_private.h"
 
-#include "wine/library.h"
-#include "wine/debug.h"
+#include <wine/library.h>
 
 #ifdef __ELF__
 
index 954a0ee..3420caa 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <config.h>
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <string.h>
-
 #include "dbghelp_private.h"
-#include <winternl.h>
-#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index 8b32795..5af8358 100644 (file)
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma once
+
 #ifdef HAVE_ELF_H
 # include <elf.h>
 #endif
index 1aaa7f1..6013867 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-#include "wine/port.h"
-
 #include "dbghelp_private.h"
 
 #ifdef HAVE_MACH_O_LOADER_H
 
-#include <assert.h>
-#include <stdarg.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_MMAN_H
-# include <sys/mman.h>
-#endif
-
 #include <mach-o/fat.h>
 #include <mach-o/loader.h>
 #include <mach-o/nlist.h>
index b00f9e2..eda087c 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <time.h>
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
 #include "dbghelp_private.h"
-#include "winternl.h"
-#include "psapi.h"
-#include "wine/debug.h"
+
+#include <time.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index b73c1da..1886dfa 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <config.h>
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <string.h>
-#include <assert.h>
-
 #include "dbghelp_private.h"
 
-#ifndef DBGHELP_STATIC_LIB
-#include <psapi.h>
-#include <wine/debug.h>
-#endif
-//#include "winternl.h"
-
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
 const WCHAR        S_ElfW[]         = {'<','e','l','f','>','\0'};
index 4978acf..73df739 100644 (file)
  *     Add symbol size to internal symbol table.
  */
 
-#define NONAMELESSUNION
-
-#include "config.h"
-#include "wine/port.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <stdarg.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winternl.h"
-
-#include "wine/exception.h"
-#include "wine/debug.h"
 #include "dbghelp_private.h"
-#include "wine/mscvpdb.h"
+
+#include <wine/exception.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_msc);
 
index 0a3162d..f4eaa1b 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <config.h>
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <string.h>
-
 #include "dbghelp_private.h"
-//#include "winnls.h"
-#include <winternl.h>
-#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index 4382221..b10bec9 100644 (file)
  *
  */
 
-#include "config.h"
-#include "wine/port.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
 #include "dbghelp_private.h"
-#include "image_private.h"
-#ifndef DBGHELP_STATIC_LIB
-#include "winternl.h"
-#include "wine/debug.h"
-#endif
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index 1dbc8a4..f500a5e 100644 (file)
@@ -20,8 +20,7 @@
 
 #include "dbghelp_private.h"
 
-ULONG __cdecl DbgPrint(IN PCCH Format, IN ...);
-#define UNIMPLEMENTED DbgPrint("DBGHELP: %s is unimplemented, please try again later.\n", __FUNCTION__);
+WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
 #define PDBGHELP_CREATE_USER_DUMP_CALLBACK PVOID
 #define PSYM_ENUMPROCESSES_CALLBACK PVOID
index d33908a..829a10d 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
  */
-#include <config.h>
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <string.h>
-#include <assert.h>
 
 #include "dbghelp_private.h"
 
-#ifndef DBGHELP_STATIC_LIB
-#include <wine/debug.h>
-#endif
-
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
 static struct module*   rb_module;
index f37629e..065556c 100644 (file)
  *     available (hopefully) from http://sources.redhat.com/gdb/onlinedocs
  */
 
-#include <config.h>
-//#include "wine/port.h"
-
-//#include <sys/types.h>
-//#include <fcntl.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-//#include <limits.h>
-//#include <stdlib.h>
-//#include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-//#include <stdio.h>
-#include <assert.h>
-//#include <stdarg.h>
+#include "dbghelp_private.h"
 
 #ifdef HAVE_MACH_O_NLIST_H
 # include <mach-o/nlist.h>
 #endif
 
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winnls.h"
-
-#include "dbghelp_private.h"
-
-#ifndef DBGHELP_STATIC_LIB
-#include <wine/debug.h>
-#endif
-
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs);
 
 #ifndef DBGHELP_STATIC_LIB
index 39df9fe..c8dcac1 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <config.h>
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <string.h>
-//#include <assert.h>
-
 #include "dbghelp_private.h"
-#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 
index b91a0dd..5f9c624 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-
-#include "config.h"
-#include <assert.h>
-#include <stdlib.h>
-
-#ifndef DBGHELP_STATIC_LIB
-#include "wine/debug.h"
-#endif
-
 #include "dbghelp_private.h"
+
 #ifdef USE_STATS
 #include <math.h>
 #endif
index aa462da..48ebb33 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <assert.h>
-
 #include "dbghelp_private.h"
 
-#ifndef DBGHELP_STATIC_LIB
-#include "wine/debug.h"
-#include "winnls.h"
-#endif
-
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 WINE_DECLARE_DEBUG_CHANNEL(dbghelp_symt);
 
index 723c3ba..ca57d1a 100644 (file)
  * upon which full support for datatype handling will eventually be built.
  */
 
-#define NONAMELESSUNION
-
-#include "config.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <assert.h>
-
-#ifndef DBGHELP_STATIC_LIB
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wine/debug.h"
-#endif
-
 #include "dbghelp_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
index 91bcbf5..50fa097 100644 (file)
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma once
+
 typedef struct EXT_API_VERSION
 {
     USHORT  MajorVersion;