From 535eb0e5706c793bcac48d587bcce0a3558ea033 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 3 May 2005 14:19:27 +0000 Subject: [PATCH] Remove winapi.h/c from findlib git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1986 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/findlib/Makefile.in | 4 +- bacula/src/findlib/winapi.c | 71 ------------------- bacula/src/findlib/winapi.h | 126 --------------------------------- 3 files changed, 2 insertions(+), 199 deletions(-) delete mode 100644 bacula/src/findlib/winapi.c delete mode 100644 bacula/src/findlib/winapi.h diff --git a/bacula/src/findlib/Makefile.in b/bacula/src/findlib/Makefile.in index a9c5c44103..51eca1780f 100644 --- a/bacula/src/findlib/Makefile.in +++ b/bacula/src/findlib/Makefile.in @@ -23,9 +23,9 @@ dummy: # LIBSRCS = find.c match.c find_one.c attibs.c create_file.c \ - bfile.c enable_priv.c fstype.c makepath.c save-cwd.c winapi.c + bfile.c enable_priv.c fstype.c makepath.c save-cwd.c LIBOBJS = find.o match.o find_one.o attribs.o create_file.o \ - bfile.o enable_priv.o fstype.o makepath.o save-cwd.o winapi.o + bfile.o enable_priv.o fstype.o makepath.o save-cwd.o .SUFFIXES: .c .o .PHONY: diff --git a/bacula/src/findlib/winapi.c b/bacula/src/findlib/winapi.c deleted file mode 100644 index e5d3483351..0000000000 --- a/bacula/src/findlib/winapi.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Windows APIs that are different for each system. - * We use pointers to the entry points so that a - * single binary will run on all Windows systems. - * - * Kern Sibbald MMIII - */ -/* - Copyright (C) 2000-2003 Kern Sibbald and John Walker - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. - - */ - -#include "bacula.h" -#include "find.h" - -#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32) - -/* API Pointers */ - -t_OpenProcessToken p_OpenProcessToken = NULL; -t_AdjustTokenPrivileges p_AdjustTokenPrivileges = NULL; -t_LookupPrivilegeValue p_LookupPrivilegeValue = NULL; - -t_SetProcessShutdownParameters p_SetProcessShutdownParameters = NULL; - -t_CreateFileA p_CreateFileA = NULL; -t_CreateFileW p_CreateFileW = NULL; - -t_wunlink p_wunlink = NULL; -t_wmkdir p_wmkdir = NULL; -t_wopen p_wopen = NULL; -t_GetFileAttributesA p_GetFileAttributesA = NULL; -t_GetFileAttributesW p_GetFileAttributesW = NULL; - -t_GetFileAttributesExA p_GetFileAttributesExA = NULL; -t_GetFileAttributesExW p_GetFileAttributesExW = NULL; - -t_SetFileAttributesA p_SetFileAttributesA = NULL; -t_SetFileAttributesW p_SetFileAttributesW = NULL; -t_BackupRead p_BackupRead = NULL; -t_BackupWrite p_BackupWrite = NULL; -t_WideCharToMultiByte p_WideCharToMultiByte = NULL; -t_MultiByteToWideChar p_MultiByteToWideChar = NULL; - -t_FindFirstFileA p_FindFirstFileA = NULL; -t_FindFirstFileW p_FindFirstFileW = NULL; - -t_FindNextFileA p_FindNextFileA = NULL; -t_FindNextFileW p_FindNextFileW = NULL; - -t_SetCurrentDirectoryA p_SetCurrentDirectoryA = NULL; -t_SetCurrentDirectoryW p_SetCurrentDirectoryW = NULL; - -t_GetCurrentDirectoryA p_GetCurrentDirectoryA = NULL; -t_GetCurrentDirectoryW p_GetCurrentDirectoryW = NULL; -#endif diff --git a/bacula/src/findlib/winapi.h b/bacula/src/findlib/winapi.h deleted file mode 100644 index 69194e75d6..0000000000 --- a/bacula/src/findlib/winapi.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Windows APIs that are different for each system. - * We use pointers to the entry points so that a - * single binary will run on all Windows systems. - * - * Kern Sibbald MMIII - */ -/* - Copyright (C) 2000-2003 Kern Sibbald and John Walker - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. - - */ - -#ifndef __WINAPI_H -#define __WINAPI_H -#if defined(HAVE_WIN32) -/* Commented out native.h include statement, which is not distributed with the - * free version of VC++, and which is not used in bacula. */ -/*#if !defined(HAVE_MINGW) // native.h not present on mingw -#include -#endif*/ -#include -#endif -#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32) -/* In ADVAPI32.DLL */ - -typedef BOOL (WINAPI * t_OpenProcessToken)(HANDLE, DWORD, PHANDLE); -typedef BOOL (WINAPI * t_AdjustTokenPrivileges)(HANDLE, BOOL, - PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD); -typedef BOOL (WINAPI * t_LookupPrivilegeValue)(LPCTSTR, LPCTSTR, PLUID); - -extern t_OpenProcessToken p_OpenProcessToken; -extern t_AdjustTokenPrivileges p_AdjustTokenPrivileges; -extern t_LookupPrivilegeValue p_LookupPrivilegeValue; - -/* In MSVCRT.DLL */ -typedef int (__cdecl * t_wunlink) (const wchar_t *); -typedef int (__cdecl * t_wmkdir) (const wchar_t *); -typedef int (__cdecl * t_wopen) (const wchar_t *, int, ...); - -extern t_wunlink p_wunlink; -extern t_wmkdir p_wmkdir; -extern t_wopen p_wopen; -/* In KERNEL32.DLL */ -typedef BOOL (WINAPI * t_GetFileAttributesExA)(LPCSTR, GET_FILEEX_INFO_LEVELS, - LPVOID); -typedef BOOL (WINAPI * t_GetFileAttributesExW)(LPCWSTR, GET_FILEEX_INFO_LEVELS, - LPVOID); - -typedef DWORD (WINAPI * t_GetFileAttributesA)(LPCSTR); -typedef DWORD (WINAPI * t_GetFileAttributesW)(LPCWSTR); -typedef BOOL (WINAPI * t_SetFileAttributesA)(LPCSTR, DWORD); -typedef BOOL (WINAPI * t_SetFileAttributesW)(LPCWSTR, DWORD); - -typedef HANDLE (WINAPI * t_CreateFileA) (LPCSTR, DWORD ,DWORD, LPSECURITY_ATTRIBUTES, - DWORD , DWORD, HANDLE); -typedef HANDLE (WINAPI * t_CreateFileW) (LPCWSTR, DWORD ,DWORD, LPSECURITY_ATTRIBUTES, - DWORD , DWORD, HANDLE); - -typedef BOOL (WINAPI * t_SetProcessShutdownParameters)(DWORD, DWORD); -typedef BOOL (WINAPI * t_BackupRead)(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*); -typedef BOOL (WINAPI * t_BackupWrite)(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*); - -typedef int (WINAPI * t_WideCharToMultiByte) (UINT CodePage, DWORD , LPCWSTR, int, - LPSTR, int, LPCSTR, LPBOOL); - -typedef int (WINAPI * t_MultiByteToWideChar) (UINT, DWORD, LPCSTR, int, LPWSTR, int); - -typedef HANDLE (WINAPI * t_FindFirstFileA) (LPCSTR, LPWIN32_FIND_DATAA); -typedef HANDLE (WINAPI * t_FindFirstFileW) (LPCWSTR, LPWIN32_FIND_DATAW); - -typedef BOOL (WINAPI * t_FindNextFileA) (HANDLE, LPWIN32_FIND_DATAA); -typedef BOOL (WINAPI * t_FindNextFileW) (HANDLE, LPWIN32_FIND_DATAW); - -typedef BOOL (WINAPI * t_SetCurrentDirectoryA) (LPCSTR); -typedef BOOL (WINAPI * t_SetCurrentDirectoryW) (LPCWSTR); - -typedef DWORD (WINAPI * t_GetCurrentDirectoryA) (DWORD, LPSTR); -typedef DWORD (WINAPI * t_GetCurrentDirectoryW) (DWORD, LPWSTR); - -extern t_GetFileAttributesA p_GetFileAttributesA; -extern t_GetFileAttributesW p_GetFileAttributesW; - -extern t_GetFileAttributesExA p_GetFileAttributesExA; -extern t_GetFileAttributesExW p_GetFileAttributesExW; - -extern t_SetFileAttributesA p_SetFileAttributesA; -extern t_SetFileAttributesW p_SetFileAttributesW; - -extern t_CreateFileA p_CreateFileA; -extern t_CreateFileW p_CreateFileW; -extern t_SetProcessShutdownParameters p_SetProcessShutdownParameters; -extern t_BackupRead p_BackupRead; -extern t_BackupWrite p_BackupWrite; - -extern t_WideCharToMultiByte p_WideCharToMultiByte; -extern t_MultiByteToWideChar p_MultiByteToWideChar; - -extern t_FindFirstFileA p_FindFirstFileA; -extern t_FindFirstFileW p_FindFirstFileW; - -extern t_FindNextFileA p_FindNextFileA; -extern t_FindNextFileW p_FindNextFileW; - -extern t_SetCurrentDirectoryA p_SetCurrentDirectoryA; -extern t_SetCurrentDirectoryW p_SetCurrentDirectoryW; - -extern t_GetCurrentDirectoryA p_GetCurrentDirectoryA; -extern t_GetCurrentDirectoryW p_GetCurrentDirectoryW; -#endif - -#endif /* __WINAPI_H */ -- 2.39.5