[MPlayer-cvslog] r30538 - in trunk/loader: com.h dmo/DMO_Filter.h drv.h dshow/DS_Filter.h ldt_keeper.c ldt_keeper.h loader.h registry.h wine/basetsd.h wine/ldt.h wine/msacm.h wine/ntdef.h wine/vfw.h wine/winbase.h ...

diego subversion at mplayerhq.hu
Thu Feb 11 15:33:57 CET 2010


Author: diego
Date: Thu Feb 11 15:33:57 2010
New Revision: 30538

Log:
Remove extern "C" declarations from loader code.
Our loader code is not a general-purpose library and not used from C++.

Modified:
   trunk/loader/com.h
   trunk/loader/dmo/DMO_Filter.h
   trunk/loader/drv.h
   trunk/loader/dshow/DS_Filter.h
   trunk/loader/ldt_keeper.c
   trunk/loader/ldt_keeper.h
   trunk/loader/loader.h
   trunk/loader/registry.h
   trunk/loader/wine/basetsd.h
   trunk/loader/wine/ldt.h
   trunk/loader/wine/msacm.h
   trunk/loader/wine/ntdef.h
   trunk/loader/wine/vfw.h
   trunk/loader/wine/winbase.h
   trunk/loader/wine/windef.h
   trunk/loader/wine/windows.h
   trunk/loader/wine/winreg.h
   trunk/loader/wine/winuser.h
   trunk/loader/wineacm.h

Modified: trunk/loader/com.h
==============================================================================
--- trunk/loader/com.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/com.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 l
 void  STDCALL  CoTaskMemFree(void*);
 #endif
 
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
 #endif /* MPLAYER_COM_H */

Modified: trunk/loader/dmo/DMO_Filter.h
==============================================================================
--- trunk/loader/dmo/DMO_Filter.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/dmo/DMO_Filter.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/drv.h
==============================================================================
--- trunk/loader/drv.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/drv.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/dshow/DS_Filter.h
==============================================================================
--- trunk/loader/dshow/DS_Filter.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/dshow/DS_Filter.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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* d
 			   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 */

Modified: trunk/loader/ldt_keeper.c
==============================================================================
--- trunk/loader/ldt_keeper.c	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/ldt_keeper.c	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 <machine/segments.h>
@@ -69,13 +62,7 @@ int modify_ldt(int func, void *ptr, unsi
 
 /* 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);

Modified: trunk/loader/ldt_keeper.h
==============================================================================
--- trunk/loader/ldt_keeper.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/ldt_keeper.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/loader.h
==============================================================================
--- trunk/loader/loader.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/loader.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 ch
 INT WINAPI LoadStringA( HINSTANCE instance, UINT resource_id,
                             LPSTR buffer, INT buflen );
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* MPLAYER_LOADER_H */

Modified: trunk/loader/registry.h
==============================================================================
--- trunk/loader/registry.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/registry.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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, 
 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 */

Modified: trunk/loader/wine/basetsd.h
==============================================================================
--- trunk/loader/wine/basetsd.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/basetsd.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/ldt.h
==============================================================================
--- trunk/loader/wine/ldt.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/ldt.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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_
    (!((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 */

Modified: trunk/loader/wine/msacm.h
==============================================================================
--- trunk/loader/wine/msacm.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/msacm.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/ntdef.h
==============================================================================
--- trunk/loader/wine/ntdef.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/ntdef.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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_ATTRI
 }
 
 
-#ifdef __cplusplus
-}
-#endif
-
 #include "poppack.h"
 
 #endif /* MPLAYER_NTDEF_H */

Modified: trunk/loader/wine/vfw.h
==============================================================================
--- trunk/loader/wine/vfw.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/vfw.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/winbase.h
==============================================================================
--- trunk/loader/wine/winbase.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/winbase.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/windef.h
==============================================================================
--- trunk/loader/wine/windef.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/windef.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/windows.h
==============================================================================
--- trunk/loader/wine/windows.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/windows.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/winreg.h
==============================================================================
--- trunk/loader/wine/winreg.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/winreg.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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 */

Modified: trunk/loader/wine/winuser.h
==============================================================================
--- trunk/loader/wine/winuser.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wine/winuser.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -5,10 +5,6 @@
 #include <stdarg.h>
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "windef.h"
 #include "pshpack1.h"
 
@@ -2923,8 +2919,4 @@ VOID        WINAPI ScreenSwitchEnable16(
 
 #define WC_DIALOG    (LPSTR)((DWORD)((WORD)( 0x8002)))
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* MPLAYER_WINUSER_H */

Modified: trunk/loader/wineacm.h
==============================================================================
--- trunk/loader/wineacm.h	Thu Feb 11 11:56:09 2010	(r30537)
+++ trunk/loader/wineacm.h	Thu Feb 11 15:33:57 2010	(r30538)
@@ -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(HACM
 PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver);
 PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj);
 
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* defined(__cplusplus) */
-
 #endif /* MPLAYER_WINEACM_H */


More information about the MPlayer-cvslog mailing list