From 2dea0dab4fafda3c10a5bd03ad15ed39a4658b51 Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Fri, 16 Sep 2011 14:28:08 +0200 Subject: Trying to chop out the uwinapi library --- sal/inc/sal/config.h | 3 -- sal/inc/systools/win32/snprintf.h | 67 ------------------------------ sal/inc/systools/win32/snprintf.h.deleteme | 67 ++++++++++++++++++++++++++++++ sal/inc/systools/win32/uwinapi.h | 67 ------------------------------ sal/inc/systools/win32/uwinapi.h.deleteme | 67 ++++++++++++++++++++++++++++++ sal/osl/w32/dllentry.c | 1 - sal/osl/w32/file.cxx | 2 - sal/osl/w32/file_dirvol.cxx | 2 - sal/osl/w32/file_error.c | 2 - sal/osl/w32/file_url.cxx | 1 - sal/osl/w32/security.c | 1 - sal/osl/w32/signal.cxx | 1 - sal/osl/w32/tempfile.cxx | 1 - sal/prj/build.lst | 5 +-- sal/util/makefile.mk | 7 ---- 15 files changed, 136 insertions(+), 158 deletions(-) delete mode 100644 sal/inc/systools/win32/snprintf.h create mode 100644 sal/inc/systools/win32/snprintf.h.deleteme delete mode 100644 sal/inc/systools/win32/uwinapi.h create mode 100644 sal/inc/systools/win32/uwinapi.h.deleteme (limited to 'sal') diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h index e4ed257e4a3f..59584bdb0f50 100644 --- a/sal/inc/sal/config.h +++ b/sal/inc/sal/config.h @@ -68,9 +68,6 @@ #ifdef __MINGW32__ #define _SNPRINTF_DLLIMPORT #endif -#ifndef _SNPRINTF_H -#include -#endif #endif /* defined WIN32 */ diff --git a/sal/inc/systools/win32/snprintf.h b/sal/inc/systools/win32/snprintf.h deleted file mode 100644 index cfed10fcaee2..000000000000 --- a/sal/inc/systools/win32/snprintf.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#ifndef _SNPRINTF_H -#define _SNPRINTF_H - -#if !defined(_WIN32) -#error ERROR: Only Win32 target supported! -#endif - -/* Macros for Unicode/ANSI support like in TCHAR.H */ - -#ifdef _UNICODE -#define sntprintf snwprintf -#define vsntprintf vsnwprintf -#else -#define sntprintf snprintf -#define vsntprintf vsnprintf -#endif - -/* Define needed types if they are not yet defined */ - - -# ifndef _VA_LIST_DEFINED - typedef char * va_list; -# define _VA_LIST_DEFINED -# endif - - -# ifndef _WCHAR_T_DEFINED - typedef unsigned short wchar_t; -# define _WCHAR_T_DEFINED -# endif - - -#ifndef _SNPRINTF_DLLIMPORT -#define _SNPRINTF_DLLIMPORT __declspec( dllimport ) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Implementations of snprintf following the ISO/IEC 9899:1999 (ISO C99) - standard. - The difference compared to _snprintf is that the buffer always is zero - terminated (unless count is zero) and the return value is the number of - characters (not including terminating zero) that would have been written - even if the buffer wasn't large - enough to hold the string. */ - - - -/* UNICODE version */ -_SNPRINTF_DLLIMPORT int __cdecl snwprintf( wchar_t *buffer, size_t count, const wchar_t *format, ... ); - -/* SBCS and MBCS version */ -_SNPRINTF_DLLIMPORT int __cdecl snprintf( char *buffer, size_t count, const char *format, ... ); - -/* Conflict with STL_port inline implementation */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SNPRINTF_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/snprintf.h.deleteme b/sal/inc/systools/win32/snprintf.h.deleteme new file mode 100644 index 000000000000..cfed10fcaee2 --- /dev/null +++ b/sal/inc/systools/win32/snprintf.h.deleteme @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +#ifndef _SNPRINTF_H +#define _SNPRINTF_H + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + +/* Macros for Unicode/ANSI support like in TCHAR.H */ + +#ifdef _UNICODE +#define sntprintf snwprintf +#define vsntprintf vsnwprintf +#else +#define sntprintf snprintf +#define vsntprintf vsnprintf +#endif + +/* Define needed types if they are not yet defined */ + + +# ifndef _VA_LIST_DEFINED + typedef char * va_list; +# define _VA_LIST_DEFINED +# endif + + +# ifndef _WCHAR_T_DEFINED + typedef unsigned short wchar_t; +# define _WCHAR_T_DEFINED +# endif + + +#ifndef _SNPRINTF_DLLIMPORT +#define _SNPRINTF_DLLIMPORT __declspec( dllimport ) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Implementations of snprintf following the ISO/IEC 9899:1999 (ISO C99) + standard. + The difference compared to _snprintf is that the buffer always is zero + terminated (unless count is zero) and the return value is the number of + characters (not including terminating zero) that would have been written + even if the buffer wasn't large + enough to hold the string. */ + + + +/* UNICODE version */ +_SNPRINTF_DLLIMPORT int __cdecl snwprintf( wchar_t *buffer, size_t count, const wchar_t *format, ... ); + +/* SBCS and MBCS version */ +_SNPRINTF_DLLIMPORT int __cdecl snprintf( char *buffer, size_t count, const char *format, ... ); + +/* Conflict with STL_port inline implementation */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SNPRINTF_H */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/uwinapi.h b/sal/inc/systools/win32/uwinapi.h deleted file mode 100644 index e7874e439e5a..000000000000 --- a/sal/inc/systools/win32/uwinapi.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#pragma once -#include -#ifdef _UWINAPI_ -# define _KERNEL32_ -# define _USER32_ -# define _SHELL32_ -#endif - -#ifndef _WINDOWS_ -#ifdef _MSC_VER -# pragma warning(push,1) /* disable warnings within system headers */ -#endif -# include -#ifdef _MSC_VER -# pragma warning(pop) -#endif -#endif - -#ifdef __MINGW32__ -#include -#ifdef _UWINAPI_ -#define WINBASEAPI -#endif -#endif - -#ifdef __cplusplus - -inline bool IsValidHandle(HANDLE handle) -{ - return handle != INVALID_HANDLE_VALUE && handle != NULL; -} - -#else /* __cplusplus */ - -#define IsValidHandle(Handle) ((DWORD)(Handle) + 1 > 1) - -#endif /* __cplusplus */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/uwinapi.h.deleteme b/sal/inc/systools/win32/uwinapi.h.deleteme new file mode 100644 index 000000000000..e7874e439e5a --- /dev/null +++ b/sal/inc/systools/win32/uwinapi.h.deleteme @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#pragma once +#include +#ifdef _UWINAPI_ +# define _KERNEL32_ +# define _USER32_ +# define _SHELL32_ +#endif + +#ifndef _WINDOWS_ +#ifdef _MSC_VER +# pragma warning(push,1) /* disable warnings within system headers */ +#endif +# include +#ifdef _MSC_VER +# pragma warning(pop) +#endif +#endif + +#ifdef __MINGW32__ +#include +#ifdef _UWINAPI_ +#define WINBASEAPI +#endif +#endif + +#ifdef __cplusplus + +inline bool IsValidHandle(HANDLE handle) +{ + return handle != INVALID_HANDLE_VALUE && handle != NULL; +} + +#else /* __cplusplus */ + +#define IsValidHandle(Handle) ((DWORD)(Handle) + 1 > 1) + +#endif /* __cplusplus */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c index 4d894260446a..f6e526cf44fe 100644 --- a/sal/osl/w32/dllentry.c +++ b/sal/osl/w32/dllentry.c @@ -34,7 +34,6 @@ #pragma warning(pop) #endif #include -#include #include #include #include diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx index b4648a72d2ae..3a1f799cfb44 100644 --- a/sal/osl/w32/file.cxx +++ b/sal/osl/w32/file.cxx @@ -32,8 +32,6 @@ #define UNICODE #define _UNICODE #define _WIN32_WINNT 0x0500 -#include "systools/win32/uwinapi.h" - #include "osl/file.hxx" #include "file_url.h" diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 8e3ea7f9f284..53dbda6ccfe6 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -29,8 +29,6 @@ #define UNICODE #define _UNICODE #define _WIN32_WINNT 0x0500 -#include "systools/win32/uwinapi.h" - #include "osl/file.h" #include "file_url.h" diff --git a/sal/osl/w32/file_error.c b/sal/osl/w32/file_error.c index bc9048d72a36..ac6a56f9d0ed 100644 --- a/sal/osl/w32/file_error.c +++ b/sal/osl/w32/file_error.c @@ -29,8 +29,6 @@ #define UNICODE #define _UNICODE #define _WIN32_WINNT 0x0500 -#include "systools/win32/uwinapi.h" - #include "file_error.h" #include "osl/diagnose.h" diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx index 82fd8d2fbc74..d665ee4a63d2 100644 --- a/sal/osl/w32/file_url.cxx +++ b/sal/osl/w32/file_url.cxx @@ -29,7 +29,6 @@ #define UNICODE #define _UNICODE #define _WIN32_WINNT 0x0500 -#include "systools/win32/uwinapi.h" #include "file_url.h" #include diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c index 053d39f446c1..81b0e85f98f5 100644 --- a/sal/osl/w32/security.c +++ b/sal/osl/w32/security.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "secimpl.h" diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx index 659d66ee1c74..a5f243dd5061 100644 --- a/sal/osl/w32/signal.cxx +++ b/sal/osl/w32/signal.cxx @@ -40,7 +40,6 @@ #include #endif #include -#include #include typedef struct _oslSignalHandlerImpl diff --git a/sal/osl/w32/tempfile.cxx b/sal/osl/w32/tempfile.cxx index 9922b699a932..d5d4f16fef57 100644 --- a/sal/osl/w32/tempfile.cxx +++ b/sal/osl/w32/tempfile.cxx @@ -29,7 +29,6 @@ #define UNICODE #define _UNICODE #define _WIN32_WINNT 0x0500 -#include "systools/win32/uwinapi.h" #include "osl/file.h" diff --git a/sal/prj/build.lst b/sal/prj/build.lst index 9f9a6accf2ef..07b7211fdd6f 100644 --- a/sal/prj/build.lst +++ b/sal/prj/build.lst @@ -5,13 +5,12 @@ sa sal\typesconfig nmake - all sa_tc sa_inc NULL sa sal\cpprt nmake - u sa_cpprt sa_util sa_inc NULL sa sal\rtl\source nmake - all sa_rtl sa_tc.u sa_inc NULL sa sal\textenc nmake - all sa_textenc sa_tc.u sa_inc NULL -sa sal\systools\win32\uwinapi nmake - n sa_uwinapi sa_inc NULL -sa sal\systools\win32\onlineupdate nmake - n sa_onlineupdate sa_uwinapi.n sa_inc NULL +sa sal\systools\win32\onlineupdate nmake - n sa_onlineupdate sa_inc NULL sa sal\osl\w32 nmake - n sa_osln sa_inc NULL sa sal\qa nmake - all sa_qa sa_util NULL sa sal\osl\unx nmake - u sa_oslu sa_tc.u sa_inc NULL sa sal\osl\all nmake - all sa_oslall sa_tc.u sa_inc NULL -sa sal\util nmake - all sa_util sa_tc.u sa_oslall sa_uwinapi.n sa_onlineupdate.n sa_osln.n sa_oslu.u sa_rtl sa_textenc NULL +sa sal\util nmake - all sa_util sa_tc.u sa_oslall sa_onlineupdate.n sa_osln.n sa_oslu.u sa_rtl sa_textenc NULL sa sal\cppunittester nmake - all sa_cppunittester sa_cpprt.u sa_util NULL sa sal\qa\ByteSequence nmake - all sa_qa_ByteSequence sa_cppunittester sa_util NULL sa sal\qa\OStringBuffer nmake - all sa_qa_OStringBuffer sa_cppunittester sa_util NULL diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk index 3a3a164480ee..76b6c130d0af 100644 --- a/sal/util/makefile.mk +++ b/sal/util/makefile.mk @@ -78,14 +78,7 @@ SHL1RPATH=URELIB .IF "$(GUI)"=="WNT" -.IF "$(COM)"=="GCC" -UWINAPILIB= -luwinapi -.ELSE -UWINAPILIB= $(LB)$/uwinapi.lib -.ENDIF - SHL1STDLIBS= \ - $(UWINAPILIB)\ $(ADVAPI32LIB)\ $(WS2_32LIB)\ $(MPRLIB)\ -- cgit