diff options
Diffstat (limited to 'src/osd/windows')
| -rw-r--r-- | src/osd/windows/mamex64.man | 10 | ||||
| -rw-r--r-- | src/osd/windows/mamex64.rc | 14 | ||||
| -rw-r--r-- | src/osd/windows/vconv.c | 1 | ||||
| -rw-r--r-- | src/osd/windows/winalloc.c | 29 | ||||
| -rw-r--r-- | src/osd/windows/windows.mak | 9 | ||||
| -rw-r--r-- | src/osd/windows/winprefix.h | 3 | ||||
| -rw-r--r-- | src/osd/windows/winsync.c | 1 |
7 files changed, 33 insertions, 34 deletions
diff --git a/src/osd/windows/mamex64.man b/src/osd/windows/mamex64.man deleted file mode 100644 index cc62373447b..00000000000 --- a/src/osd/windows/mamex64.man +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> - <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <assemblyIdentity version="1.0.0.0" processorArchitecture="amd64" name="MAME" type="win32" /> - <description>Multiple Arcade Machine Emulator</description> - <dependency> - <dependentAssembly> - <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="amd64"/> - </dependentAssembly> - </dependency> -</assembly> diff --git a/src/osd/windows/mamex64.rc b/src/osd/windows/mamex64.rc deleted file mode 100644 index 76290bcd355..00000000000 --- a/src/osd/windows/mamex64.rc +++ /dev/null @@ -1,14 +0,0 @@ -// -// mamex64.rc - Minimal resource file for Win32 MAME -// -// Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. -// Visit http://mamedev.org for licensing and usage restrictions. -// - -#define NOWINRES -#include "windows.h" -#include "commctrl.h" - -#include "mamevers.rc" - -1 24 MOVEABLE PURE "mamex64.man" diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c index 039dcb082f3..01098ae489f 100644 --- a/src/osd/windows/vconv.c +++ b/src/osd/windows/vconv.c @@ -86,6 +86,7 @@ static const translation_info gcc_translate[] = { 0, "-mwindows", "" }, { 0, "-mno-cygwin", "" }, { 0, "-std=gnu89", "" }, + { 0, "-pipe", "" }, { 0 } }; diff --git a/src/osd/windows/winalloc.c b/src/osd/windows/winalloc.c index c54eda5e768..8b6b3679519 100644 --- a/src/osd/windows/winalloc.c +++ b/src/osd/windows/winalloc.c @@ -328,7 +328,10 @@ void *realloc_file_line(void *memory, size_t size, const char *file, int line) } else { - newmemory = (void *) GlobalReAlloc(memory, size, GMEM_MOVEABLE); + if (memory != NULL) + newmemory = (void *) GlobalReAlloc(memory, size, GMEM_MOVEABLE); + else + newmemory = (void *) GlobalAlloc(GMEM_FIXED, size); } return newmemory; @@ -380,17 +383,27 @@ void CLIB_DECL free(void *memory) size_t CLIB_DECL _msize(void *memory) { - memory_entry *entry = find_entry(memory); - if (entry == NULL) + size_t result; + + if (use_malloc_tracking()) { - if (winalloc_in_main_code) + memory_entry *entry = find_entry(memory); + if (entry == NULL) { - fprintf(stderr, "Error: msize a non-existant block\n"); - osd_break_into_debugger("Error: msize a non-existant block"); + if (winalloc_in_main_code) + { + fprintf(stderr, "Error: msize a non-existant block\n"); + osd_break_into_debugger("Error: msize a non-existant block"); + } + return 0; } - return 0; + result = entry->size; + } + else + { + result = GlobalSize(memory); } - return entry->size; + return result; } diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index d969bc490aa..6212c9ba5e5 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -83,6 +83,11 @@ ifdef MSVC_BUILD VCONV = $(WINOBJ)/vconv$(EXE) +# append a 'v' prefix if nothing specified +ifndef PREFIX +PREFIX = v +endif + # replace the various compilers with vconv.exe prefixes CC = @$(VCONV) gcc -I. LD = @$(VCONV) ld /profile @@ -103,11 +108,11 @@ LD += /LTCG endif ifdef PTR64 -CC += /wd4267 /Wp64 +CC += /wd4267 endif # add some VC++-specific defines -DEFS += -D_CRT_SECURE_NO_DEPRECATE -DXML_STATIC -D__inline__=__inline -Dsnprintf=_snprintf -Dvsnprintf=_vsnprintf +DEFS += -D_CRT_SECURE_NO_DEPRECATE -DXML_STATIC -D__inline__=__inline -Dsnprintf=_snprintf # make msvcprep into a pre-build step # OSPREBUILD = $(VCONV) diff --git a/src/osd/windows/winprefix.h b/src/osd/windows/winprefix.h index a902120f2e7..fce57fb2f34 100644 --- a/src/osd/windows/winprefix.h +++ b/src/osd/windows/winprefix.h @@ -26,6 +26,9 @@ void * realloc_file_line(void *memory, size_t size, const char *file, int line); #ifdef _MSC_VER void *__cdecl _alloca(size_t); #define alloca _alloca +#if _MSC_VER < 1400 +#define vsnprintf _vsnprintf +#endif #endif #ifdef __GNUC__ diff --git a/src/osd/windows/winsync.c b/src/osd/windows/winsync.c index ac84373e43d..8ee9e2f03ec 100644 --- a/src/osd/windows/winsync.c +++ b/src/osd/windows/winsync.c @@ -16,6 +16,7 @@ // MAME headers #include "osdcore.h" +#include "osinline.h" //============================================================ |
