From 8322f0aef1f97a0b6377fca57ee5131b143e67f6 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 16:06:15 +0000 Subject: Remove pointless #ifdef around the whole file, it is just a complicated #if 1. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27760 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/com.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'loader') diff --git a/loader/com.h b/loader/com.h index 3e9c1f3692..27f6a916b7 100644 --- a/loader/com.h +++ b/loader/com.h @@ -18,8 +18,6 @@ * Internal functions and structures for COM emulation code. */ -#if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) - #ifdef __cplusplus extern "C" { #endif @@ -89,6 +87,4 @@ void STDCALL CoTaskMemFree(void*); }; #endif /* __cplusplus */ -#endif /* WIN32 */ - #endif /* MPLAYER_COM_H */ -- cgit v1.2.3 From 6b52a2e974ba3c3065d13a16cc2fa69f96745d0d Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:59:27 +0000 Subject: Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg. Neither variant is valid C99 syntax, but __asm__ is the most portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27788 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/win32.c | 2 +- loader/wine/winnt.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'loader') diff --git a/loader/win32.c b/loader/win32.c index 13f880c137..b3b157bb5d 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -4569,7 +4569,7 @@ static INT WINAPI expMessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type void exp_EH_prolog(void *dest); //! just a dummy function that acts a container for the asm section void exp_EH_prolog_dummy(void) { - asm volatile ( + __asm__ volatile ( // take care, this "function" may not change flags or // registers besides eax (which is also why we can't use // exp_EH_prolog_dummy directly) diff --git a/loader/wine/winnt.h b/loader/wine/winnt.h index cbe06f6976..19594e71b1 100644 --- a/loader/wine/winnt.h +++ b/loader/wine/winnt.h @@ -693,7 +693,7 @@ typedef HANDLE *PHANDLE; #else /* __GNUC__ */ # define ASM_GLOBAL_FUNC(name,code) \ void asm_dummy_##name(void) { \ - asm( ".align 4\n\t" \ + __asm__( ".align 4\n\t" \ ".globl " ASM_NAME(#name) "\n\t" \ ".type " ASM_NAME(#name) ",@function\n" \ ASM_NAME(#name) ":\n\t" \ -- cgit v1.2.3 From 26b29f4f2d4284fb81647a00b81530f280881303 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 20:17:56 +0000 Subject: Replace all occurrences of '__volatile__' and '__volatile' by plain 'volatile'. We were using an inconsistent mix of the three variants and 'volatile' should be the most correct and portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27791 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/drv.c | 8 ++++---- loader/ldt_keeper.c | 6 +++--- loader/qtx/qtxload.c | 4 ++-- loader/win32.c | 26 +++++++++++++------------- loader/wine/windef.h | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) (limited to 'loader') diff --git a/loader/drv.c b/loader/drv.c index 5d4f0dcb93..b8fecf7467 100644 --- a/loader/drv.c +++ b/loader/drv.c @@ -52,7 +52,7 @@ extern char* def_path; #else // this asm code is no longer needed #define STORE_ALL \ - __asm__ __volatile__ ( \ + __asm__ volatile ( \ "push %%ebx\n\t" \ "push %%ecx\n\t" \ "push %%edx\n\t" \ @@ -60,7 +60,7 @@ extern char* def_path; "push %%edi\n\t"::) #define REST_ALL \ - __asm__ __volatile__ ( \ + __asm__ volatile ( \ "pop %%edi\n\t" \ "pop %%esi\n\t" \ "pop %%edx\n\t" \ @@ -98,7 +98,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, #endif if (!module || !module->hDriverModule || !module->DriverProc) return -1; #ifndef __svr4__ - __asm__ __volatile__ ("fsave (%0)\n\t": :"r"(&qw)); + __asm__ volatile ("fsave (%0)\n\t": :"r"(&qw)); #endif #ifdef WIN32_LOADER @@ -110,7 +110,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, REST_ALL; #ifndef __svr4__ - __asm__ __volatile__ ("frstor (%0)\n\t": :"r"(&qw)); + __asm__ volatile ("frstor (%0)\n\t": :"r"(&qw)); #endif #ifdef DETAILED_OUT diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c index ef9386435e..e0d4447e60 100644 --- a/loader/ldt_keeper.c +++ b/loader/ldt_keeper.c @@ -138,7 +138,7 @@ void Setup_FS_Segment(void) { unsigned int ldt_desc = LDT_SEL(fs_ldt); - __asm__ __volatile__( + __asm__ volatile( "movl %0,%%eax; movw %%ax, %%fs" : : "r" (ldt_desc) :"eax" ); @@ -154,7 +154,7 @@ static int LDT_Modify( int func, struct modify_ldt_ldt_s *ptr, { int res; #ifdef __PIC__ - __asm__ __volatile__( "pushl %%ebx\n\t" + __asm__ volatile( "pushl %%ebx\n\t" "movl %2,%%ebx\n\t" "int $0x80\n\t" "popl %%ebx" @@ -165,7 +165,7 @@ static int LDT_Modify( int func, struct modify_ldt_ldt_s *ptr, "d"(16)//sizeof(*ptr) from kernel point of view :"esi" ); #else - __asm__ __volatile__("int $0x80" + __asm__ volatile("int $0x80" : "=a" (res) : "0" (__NR_modify_ldt), "b" (func), diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c index 772ee5b0c5..38e0decda2 100644 --- a/loader/qtx/qtxload.c +++ b/loader/qtx/qtxload.c @@ -104,7 +104,7 @@ int main(int argc, char *argv[]){ printf("params: flags: %d, paramSize: %d, what: %d, params[0] = %x\n", params->flags, params->paramSize, params->what, params->params[0]); -// __asm__ __volatile__ ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); +// __asm__ volatile ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); // printf("ESP=%p\n",esp); *((void**)0x62b7d640) = &x_table[0]; //malloc(0x00001837 * 4); // ugly hack? @@ -113,7 +113,7 @@ int main(int argc, char *argv[]){ ret = dispatcher(params, &globals); -// __asm__ __volatile__ ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); +// __asm__ volatile ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); // printf("ESP=%p\n",esp); printf("!!! CDComponentDispatch() => %d glob=%p\n",ret,globals); diff --git a/loader/win32.c b/loader/win32.c index b3b157bb5d..576e3bd945 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -79,7 +79,7 @@ char* def_path = WIN32_PATH; static void do_cpuid(unsigned int ax, unsigned int *regs) { - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx; pushl %%ecx; pushl %%edx;" ".byte 0x0f, 0xa2;" @@ -95,7 +95,7 @@ static void do_cpuid(unsigned int ax, unsigned int *regs) static unsigned int c_localcount_tsc() { int a; - __asm__ __volatile__ + __asm__ volatile ( "rdtsc\n\t" :"=a"(a) @@ -106,7 +106,7 @@ static unsigned int c_localcount_tsc() } static void c_longcount_tsc(long long* z) { - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx\n\t" "movl %%eax, %%ebx\n\t" @@ -2867,7 +2867,7 @@ static int WINAPI expIsBadStringPtrA(const char* string, int nchars) static long WINAPI expInterlockedExchangeAdd( long* dest, long incr ) { long ret; - __asm__ __volatile__ + __asm__ volatile ( "lock; xaddl %0,(%1)" : "=r" (ret) @@ -4006,7 +4006,7 @@ static int exp_initterm(INITTERMFUNC *start, INITTERMFUNC *end) // ok this trick with push/pop is necessary as otherwice // edi/esi registers are being trashed void* p = *start; - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx \n\t" "pushl %%ecx \n\t" @@ -4272,7 +4272,7 @@ static double expcos(double x) static void explog10(void) { - __asm__ __volatile__ + __asm__ volatile ( "fldl 8(%esp) \n\t" "fldln2 \n\t" @@ -4283,7 +4283,7 @@ static void explog10(void) static void expcos(void) { - __asm__ __volatile__ + __asm__ volatile ( "fldl 8(%esp) \n\t" "fcos \n\t" @@ -4300,7 +4300,7 @@ static void expcos(void) static void exp_ftol(void) { - __asm__ __volatile__ + __asm__ volatile ( "sub $12, %esp \n\t" "fstcw -2(%ebp) \n\t" @@ -4319,8 +4319,8 @@ static void exp_ftol(void) } #define FPU_DOUBLES(var1,var2) double var1,var2; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) + __asm__ volatile( "fstpl %0;fwait" : "=m" (var2) : ); \ + __asm__ volatile( "fstpl %0;fwait" : "=m" (var1) : ) static double exp_CIpow(void) { @@ -4361,7 +4361,7 @@ static int exp_setjmp3(void* jmpbuf, int x) { //dbgprintf("!!!!UNIMPLEMENTED: setjmp3(%p, %d) => 0\n", jmpbuf, x); //return 0; - __asm__ __volatile__ + __asm__ volatile ( //"mov 4(%%esp), %%edx \n\t" "mov (%%esp), %%eax \n\t" @@ -4383,7 +4383,7 @@ static int exp_setjmp3(void* jmpbuf, int x) : "eax" ); #if 1 - __asm__ __volatile__ + __asm__ volatile ( "mov %%fs:0, %%eax \n\t" // unsure "mov %%eax, 24(%%edx) \n\t" @@ -4762,7 +4762,7 @@ static double expfloor(double x) } #define FPU_DOUBLE(var) double var; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) + __asm__ volatile( "fstpl %0;fwait" : "=m" (var) : ) static double exp_CIcos(void) { diff --git a/loader/wine/windef.h b/loader/wine/windef.h index 7b836e12a4..9d90a42257 100644 --- a/loader/wine/windef.h +++ b/loader/wine/windef.h @@ -94,7 +94,7 @@ extern "C" { # ifndef _EGCS_ #define __stdcall __attribute__((__stdcall__)) #define __cdecl __attribute__((__cdecl__)) -# define RESTORE_ES __asm__ __volatile__("pushl %ds\n\tpopl %es") +# define RESTORE_ES __asm__ volatile("pushl %ds\n\tpopl %es") # endif # else // # error You need gcc >= 2.7 to build Wine on a 386 -- cgit v1.2.3 From 33c347f66ee0835ce65c70ff8c2568aa4069d07a Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 19 Oct 2008 20:02:21 +0000 Subject: Translate a Hungarian comment, thanks to Denes Balatoni. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27806 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/qtx/qtxload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'loader') diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c index 38e0decda2..0fb13aa9a4 100644 --- a/loader/qtx/qtxload.c +++ b/loader/qtx/qtxload.c @@ -7,7 +7,7 @@ #include "ldt_keeper.h" #include "mp_msg.h" -/* ilyen egy sima komponens */ +/* this is what a plain component looks like */ ComponentResult ComponentDummy( ComponentParameters *params, void **globals, -- cgit v1.2.3