From 0a3901e1aebd64e78ed6033ac90fdaffd77ce68e Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 11 Feb 2010 14:33:57 +0000 Subject: Remove extern "C" declarations from loader code. Our loader code is not a general-purpose library and not used from C++. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30538 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/com.h | 8 -------- loader/dmo/DMO_Filter.h | 8 -------- loader/drv.h | 8 -------- loader/dshow/DS_Filter.h | 8 -------- loader/ldt_keeper.c | 16 ---------------- loader/ldt_keeper.h | 8 -------- loader/loader.h | 8 -------- loader/registry.h | 7 ------- loader/wine/basetsd.h | 8 -------- loader/wine/ldt.h | 7 ------- loader/wine/msacm.h | 8 -------- loader/wine/ntdef.h | 8 -------- loader/wine/vfw.h | 7 ------- loader/wine/winbase.h | 8 -------- loader/wine/windef.h | 8 -------- loader/wine/windows.h | 8 -------- loader/wine/winreg.h | 8 -------- loader/wine/winuser.h | 8 -------- loader/wineacm.h | 9 --------- 19 files changed, 158 deletions(-) (limited to 'loader') diff --git a/loader/com.h b/loader/com.h index 6bbbc55b7d..3e9a94bd67 100644 --- a/loader/com.h +++ b/loader/com.h @@ -18,10 +18,6 @@ * Internal functions and structures for COM emulation code. */ -#ifdef __cplusplus -extern "C" { -#endif - #ifndef GUID_TYPE #define GUID_TYPE typedef struct @@ -83,8 +79,4 @@ void* STDCALL CoTaskMemAlloc(unsigned long); void STDCALL CoTaskMemFree(void*); #endif -#ifdef __cplusplus -}; -#endif /* __cplusplus */ - #endif /* MPLAYER_COM_H */ diff --git a/loader/dmo/DMO_Filter.h b/loader/dmo/DMO_Filter.h index ca04b2c4cd..0273245669 100644 --- a/loader/dmo/DMO_Filter.h +++ b/loader/dmo/DMO_Filter.h @@ -4,10 +4,6 @@ #include "dmo_guids.h" #include "dmo_interfaces.h" -#if defined(__cplusplus) -extern "C" { -#endif - typedef struct DMO_Filter { int m_iHandle; @@ -40,8 +36,4 @@ void DMO_Filter_Destroy(DMO_Filter* This); */ CMediaBuffer* CMediaBufferCreate(unsigned long maxlen, void* mem, unsigned long len, int copy); -#if defined(__cplusplus) -} -#endif - #endif /* MPLAYER_DMO_FILTER_H */ diff --git a/loader/drv.h b/loader/drv.h index b064b46802..9ae1f8fbec 100644 --- a/loader/drv.h +++ b/loader/drv.h @@ -6,10 +6,6 @@ #ifndef MPLAYER_DRV_H #define MPLAYER_DRV_H -#ifdef __cplusplus -extern "C" { -#endif - #include "wine/windef.h" #include "wine/driver.h" @@ -20,8 +16,4 @@ void CodecRelease(void); HDRVR DrvOpen(LPARAM lParam2); void DrvClose(HDRVR hdrvr); -#ifdef __cplusplus -} -#endif - #endif /* MPLAYER_DRV_H */ diff --git a/loader/dshow/DS_Filter.h b/loader/dshow/DS_Filter.h index 8fda4b4ef2..945321a153 100644 --- a/loader/dshow/DS_Filter.h +++ b/loader/dshow/DS_Filter.h @@ -4,10 +4,6 @@ #include "inputpin.h" #include "outputpin.h" -#if defined(__cplusplus) -extern "C" { -#endif - typedef struct { char* frame_pointer; long frame_size; @@ -43,8 +39,4 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt,SampleProcUserData* pUserData); void DS_Filter_Destroy(DS_Filter* This); -#if defined(__cplusplus) -} -#endif - #endif /* MPLAYER_DS_FILTER_H */ diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c index a7c250de8e..d008a2909d 100644 --- a/loader/ldt_keeper.c +++ b/loader/ldt_keeper.c @@ -43,19 +43,12 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47) #define modify_ldt_ldt_s user_desc #endif -/* prototype it here, so we won't depend on kernel headers */ -#ifdef __cplusplus -extern "C" { -#endif /// declare modify_ldt with the _syscall3 macro for older glibcs #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)) _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount ); #else int modify_ldt(int func, void *ptr, unsigned long bytecount); #endif -#ifdef __cplusplus -} -#endif #else #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include @@ -69,13 +62,7 @@ int modify_ldt(int func, void *ptr, unsigned long bytecount); /* solaris x86: add missing prototype for sysi86(), but only when sysi86(int, void*) is known to be valid */ #ifdef HAVE_SYSI86_iv -#ifdef __cplusplus -extern "C" { -#endif int sysi86(int, void*); -#ifdef __cplusplus -} -#endif #endif #ifndef NUMSYSLDTS /* SunOS 2.5.1 does not define NUMSYSLDTS */ @@ -127,9 +114,6 @@ static unsigned int fs_ldt = TEB_SEL_IDX; * in C++ we use static class for this... */ -#ifdef __cplusplus -extern "C" -#endif void Setup_FS_Segment(void) { unsigned int ldt_desc = LDT_SEL(fs_ldt); diff --git a/loader/ldt_keeper.h b/loader/ldt_keeper.h index c339987635..9fff8de0c1 100644 --- a/loader/ldt_keeper.h +++ b/loader/ldt_keeper.h @@ -1,11 +1,6 @@ #ifndef MPLAYER_LDT_KEEPER_H #define MPLAYER_LDT_KEEPER_H -#ifdef __cplusplus -extern "C" -{ -#endif - typedef struct { void* fs_seg; char* prev_struct; @@ -14,8 +9,5 @@ typedef struct { void Setup_FS_Segment(void); ldt_fs_t* Setup_LDT_Keeper(void); void Restore_LDT_Keeper(ldt_fs_t* ldt_fs); -#ifdef __cplusplus -} -#endif #endif /* MPLAYER_LDT_KEEPER_H */ diff --git a/loader/loader.h b/loader/loader.h index 29c13ef522..48778e1882 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -14,10 +14,6 @@ #ifndef MPLAYER_LOADER_H #define MPLAYER_LOADER_H -#ifdef __cplusplus -extern "C" { -#endif - #include "wine/windef.h" #include "wine/driver.h" #include "wine/mmreg.h" @@ -33,8 +29,4 @@ int WritePrivateProfileStringA_(const char* appname, const char* keyname, INT WINAPI LoadStringA( HINSTANCE instance, UINT resource_id, LPSTR buffer, INT buflen ); -#ifdef __cplusplus -} -#endif - #endif /* MPLAYER_LOADER_H */ diff --git a/loader/registry.h b/loader/registry.h index 4f0d09f53d..1b2a12afd7 100644 --- a/loader/registry.h +++ b/loader/registry.h @@ -13,10 +13,6 @@ * http://svn.mplayerhq.hu/mplayer/trunk/ */ -#ifdef __cplusplus -extern "C" { -#endif - #include "wine/winbase.h" void free_registry(void); @@ -40,8 +36,5 @@ long __stdcall RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpc long __stdcall RegEnumValueA(HKEY hkey, DWORD index, LPSTR value, LPDWORD val_count, LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count); #endif -#ifdef __cplusplus -}; -#endif #endif /* MPLAYER_REGISTRY_H */ diff --git a/loader/wine/basetsd.h b/loader/wine/basetsd.h index 7a13d58dba..0ec90a9aeb 100644 --- a/loader/wine/basetsd.h +++ b/loader/wine/basetsd.h @@ -13,10 +13,6 @@ #include "config.h" -#ifdef __cplusplus -extern "C" { -#endif /* defined(__cplusplus) */ - /* * Win32 was easy to implement under Unix since most (all?) 32-bit * Unices uses the same type model (ILP32) as Win32, where int, long @@ -165,8 +161,4 @@ typedef __uint32 DWORD_PTR, *PDWORD_PTR; typedef INT_PTR SSIZE_T, *PSSIZE_T; typedef UINT_PTR SIZE_T, *PSIZE_T; -#ifdef __cplusplus -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - #endif /* MPLAYER_BASETSD_H */ diff --git a/loader/wine/ldt.h b/loader/wine/ldt.h index e3f511b062..e607085f33 100644 --- a/loader/wine/ldt.h +++ b/loader/wine/ldt.h @@ -26,10 +26,6 @@ typedef struct int limit_in_pages; /* is the limit in pages or bytes? */ enum seg_type type; /* segment type */ } ldt_entry; -#ifdef __cplusplus -extern "C" -{ -#endif void LDT_BytesToEntry( const unsigned long *buffer, ldt_entry *content ); void LDT_EntryToBytes( unsigned long *buffer, const ldt_entry *content ); int LDT_GetEntry( int entry, ldt_entry *content ); @@ -92,8 +88,5 @@ extern unsigned char ldt_flags_copy[LDT_SIZE]; (!((sel) & 4) || (SELECTOR_TO_ENTRY(sel) < FIRST_LDT_ENTRY_TO_ALLOC)) #define IS_SELECTOR_32BIT(sel) \ (IS_SELECTOR_SYSTEM(sel) || (GET_SEL_FLAGS(sel) & LDT_FLAGS_32BIT)) -#ifdef __cplusplus -} -#endif #endif /* MPLAYER_LDT_H */ diff --git a/loader/wine/msacm.h b/loader/wine/msacm.h index 6a0be7c068..b8b24383c6 100644 --- a/loader/wine/msacm.h +++ b/loader/wine/msacm.h @@ -9,10 +9,6 @@ #include "driver.h" #include "mmreg.h" -#ifdef __cplusplus -extern "C" { -#endif /* defined(__cplusplus) */ - //typedef WORD VERSION; /* major (high byte), minor (low byte) */ typedef UINT16 MMVERSION16; @@ -934,8 +930,4 @@ MMRESULT WINAPI acmStreamUnprepareHeader( HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare ); -#ifdef __cplusplus -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - #endif /* MPLAYER_MSACM_H */ diff --git a/loader/wine/ntdef.h b/loader/wine/ntdef.h index 9e68828bbf..c7061a4c1d 100644 --- a/loader/wine/ntdef.h +++ b/loader/wine/ntdef.h @@ -6,10 +6,6 @@ #include "pshpack1.h" -#ifdef __cplusplus -extern "C" { -#endif - #define NTAPI __stdcall #ifndef IN @@ -92,10 +88,6 @@ typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES; } -#ifdef __cplusplus -} -#endif - #include "poppack.h" #endif /* MPLAYER_NTDEF_H */ diff --git a/loader/wine/vfw.h b/loader/wine/vfw.h index 1cf94b5ac7..7bf72be42d 100644 --- a/loader/wine/vfw.h +++ b/loader/wine/vfw.h @@ -6,10 +6,6 @@ #ifndef MPLAYER_VFW_H #define MPLAYER_VFW_H //#include "pshpack1.h" -#ifdef __cplusplus -extern "C" { -#endif - #include "windef.h" typedef struct __attribute__((__packed__)) @@ -667,7 +663,4 @@ typedef struct { #define AVIERR_USERABORT MAKE_AVIERR(198) #define AVIERR_ERROR MAKE_AVIERR(199) -#ifdef __cplusplus -} -#endif #endif /* MPLAYER_VFW_H */ diff --git a/loader/wine/winbase.h b/loader/wine/winbase.h index b7ae733553..a8fe81ee3f 100644 --- a/loader/wine/winbase.h +++ b/loader/wine/winbase.h @@ -7,10 +7,6 @@ #include "pshpack1.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct tagCOORD { INT16 x; INT16 y; @@ -1778,8 +1774,4 @@ VOID WINAPI SetLastError(DWORD); #define GetCurrentProcess() ((HANDLE)0xffffffff) #define GetCurrentThread() ((HANDLE)0xfffffffe) -#ifdef __cplusplus -} -#endif - #endif /* MPLAYER_WINBASE_H */ diff --git a/loader/wine/windef.h b/loader/wine/windef.h index ddf0228dd0..24b0039cee 100644 --- a/loader/wine/windef.h +++ b/loader/wine/windef.h @@ -17,10 +17,6 @@ #define __stdcall #endif -#ifdef __cplusplus -extern "C" { -#endif - /* Misc. constants. */ #ifdef FALSE @@ -633,8 +629,4 @@ typedef const RECTL *LPCRECTL; ((r16)->left = (INT16)(r32)->left, (r16)->top = (INT16)(r32)->top, \ (r16)->right = (INT16)(r32)->right, (r16)->bottom = (INT16)(r32)->bottom) -#ifdef __cplusplus -} -#endif - #endif /* MPLAYER_WINDEF_H */ diff --git a/loader/wine/windows.h b/loader/wine/windows.h index 505110d4b9..1443bb32b1 100644 --- a/loader/wine/windows.h +++ b/loader/wine/windows.h @@ -1,10 +1,6 @@ #ifndef MPLAYER_WINDOWS_H #define MPLAYER_WINDOWS_H -#ifdef __cplusplus -extern "C" { -#endif - #include "windef.h" #include "winbase.h" #include "winuser.h" @@ -31,8 +27,4 @@ typedef KANJISTRUCT *PKANJISTRUCT; #endif /* 0 */ -#ifdef __cplusplus -} -#endif - #endif /* MPLAYER_WINDOWS_H */ diff --git a/loader/wine/winreg.h b/loader/wine/winreg.h index ede64c0fd5..f01c42fcca 100644 --- a/loader/wine/winreg.h +++ b/loader/wine/winreg.h @@ -7,10 +7,6 @@ #include "winbase.h" #include "winnt.h" -#ifdef __cplusplus -extern "C" { -#endif /* defined(__cplusplus) */ - /* #define SHELL_ERROR_SUCCESS 0L #define SHELL_ERROR_BADDB 1L @@ -50,8 +46,4 @@ typedef struct value_entW { typedef ACCESS_MASK REGSAM; -#ifdef __cplusplus -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - #endif /* MPLAYER_WINREG_H */ diff --git a/loader/wine/winuser.h b/loader/wine/winuser.h index cda96c4f23..ec451d748e 100644 --- a/loader/wine/winuser.h +++ b/loader/wine/winuser.h @@ -5,10 +5,6 @@ #include #endif -#ifdef __cplusplus -extern "C" { -#endif - #include "windef.h" #include "pshpack1.h" @@ -2923,8 +2919,4 @@ VOID WINAPI ScreenSwitchEnable16(WORD); #define WC_DIALOG (LPSTR)((DWORD)((WORD)( 0x8002))) -#ifdef __cplusplus -} -#endif - #endif /* MPLAYER_WINUSER_H */ diff --git a/loader/wineacm.h b/loader/wineacm.h index af4d3073bd..1acfb0c55d 100644 --- a/loader/wineacm.h +++ b/loader/wineacm.h @@ -9,11 +9,6 @@ #include "wine/msacmdrv.h" -#ifdef __cplusplus -extern "C" { -#endif /* defined(__cplusplus) */ - - typedef struct WINE_ACMDRIVERID *PWINE_ACMDRIVERID; typedef struct WINE_ACMDRIVER *PWINE_ACMDRIVER; @@ -65,8 +60,4 @@ PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID); PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver); PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj); -#ifdef __cplusplus -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - #endif /* MPLAYER_WINEACM_H */ -- cgit v1.2.3