winpr: fix headers for C++ (VOID issue)
authorMarc-André Moreau <marcandre.moreau@gmail.com>
Wed, 3 Apr 2013 20:54:09 +0000 (16:54 -0400)
committerMarc-André Moreau <marcandre.moreau@gmail.com>
Wed, 3 Apr 2013 20:54:09 +0000 (16:54 -0400)
winpr/include/winpr/error.h
winpr/include/winpr/thread.h

index 8999d38..077d2ca 100644 (file)
 
 #else
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef NO_ERROR
 #define NO_ERROR    0
 #endif
@@ -2908,7 +2912,7 @@ WINPR_API UINT GetErrorMode(void);
 
 WINPR_API UINT SetErrorMode(UINT uMode);
 
-WINPR_API DWORD GetLastError(VOID);
+WINPR_API DWORD GetLastError(void);
 
 WINPR_API VOID SetLastError(DWORD dwErrCode);
 
@@ -2928,6 +2932,10 @@ WINPR_API PVOID AddVectoredContinueHandler(ULONG First, PVECTORED_EXCEPTION_HAND
 
 WINPR_API ULONG RemoveVectoredContinueHandler(PVOID Handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
 #endif /* WINPR_ERROR_H */
index cf7d8a1..fd611cb 100644 (file)
 
 #ifndef _WIN32
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct _STARTUPINFOA
 {
        DWORD cb;
@@ -108,8 +112,8 @@ WINPR_API BOOL CreateProcessAsUserW(HANDLE hToken, LPCWSTR lpApplicationName, LP
 
 DECLSPEC_NORETURN WINPR_API VOID ExitProcess(UINT uExitCode);
 
-WINPR_API HANDLE _GetCurrentProcess(VOID);
-WINPR_API DWORD GetCurrentProcessId(VOID);
+WINPR_API HANDLE _GetCurrentProcess(void);
+WINPR_API DWORD GetCurrentProcessId(void);
 
 WINPR_API BOOL TerminateProcess(HANDLE hProcess, UINT uExitCode);
 
@@ -127,24 +131,24 @@ WINPR_API HANDLE CreateRemoteThread(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThr
 DECLSPEC_NORETURN WINPR_API VOID ExitThread(DWORD dwExitCode);
 WINPR_API BOOL GetExitCodeThread(HANDLE hThread, LPDWORD lpExitCode);
 
-WINPR_API HANDLE _GetCurrentThread(VOID);
-WINPR_API DWORD GetCurrentThreadId(VOID);
+WINPR_API HANDLE _GetCurrentThread(void);
+WINPR_API DWORD GetCurrentThreadId(void);
 
 WINPR_API DWORD ResumeThread(HANDLE hThread);
 WINPR_API DWORD SuspendThread(HANDLE hThread);
-WINPR_API BOOL SwitchToThread(VOID);
+WINPR_API BOOL SwitchToThread(void);
 
 WINPR_API BOOL TerminateThread(HANDLE hThread, DWORD dwExitCode);
 
 /* Processor */
 
-WINPR_API DWORD GetCurrentProcessorNumber(VOID);
+WINPR_API DWORD GetCurrentProcessorNumber(void);
 
 /* Thread-Local Storage */
 
 #define TLS_OUT_OF_INDEXES     ((DWORD) 0xFFFFFFFF)
 
-WINPR_API DWORD TlsAlloc(VOID);
+WINPR_API DWORD TlsAlloc(void);
 WINPR_API LPVOID TlsGetValue(DWORD dwTlsIndex);
 WINPR_API BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
 WINPR_API BOOL TlsFree(DWORD dwTlsIndex);
@@ -159,5 +163,9 @@ WINPR_API BOOL TlsFree(DWORD dwTlsIndex);
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* WINPR_THREAD_H */