XQuilla/include/xqilla/framework/XQillaExport.hpp

68 lines
2.1 KiB
C++
Raw Normal View History

2020-02-17 21:05:20 +00:00
/*
2020-02-17 21:22:42 +00:00
* Copyright (c) 2001, 2008,
2020-02-17 21:05:20 +00:00
* DecisionSoft Limited. All rights reserved.
2020-02-17 21:24:47 +00:00
* Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
2020-02-17 21:23:16 +00:00
*
2020-02-17 21:05:20 +00:00
*
2020-02-17 21:12:51 +00:00
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
2020-02-17 21:05:20 +00:00
*
2020-02-17 21:12:51 +00:00
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
2020-02-17 21:05:20 +00:00
*/
#ifndef __XQILLAEXPORT_HPP
#define __XQILLAEXPORT_HPP
/*
* This define tells VS8 not to give a warning when we use strcpy()
* instead of the MS secure function strcpy_s().
*/
#ifdef _MSC_VER
2020-02-17 21:13:50 +00:00
#define WIN32 1
#ifndef _CRT_SECURE_NO_DEPRECATE
2020-02-17 21:05:20 +00:00
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
2020-02-17 21:13:50 +00:00
#endif
2020-02-17 21:05:20 +00:00
2020-02-17 21:11:31 +00:00
/*
* Building statically on Windows:
*
2020-02-17 21:19:08 +00:00
* 1) Compile Xerces-C with XERCES_STATIC_LIBRARY defined to get a static library
2020-02-17 21:11:31 +00:00
* 2) Compile XQilla with XQILLA_API defined to nothing, to compile without
* the DLL import/exports
*/
2020-02-17 21:05:20 +00:00
/*
* The following ifdef block is the standard way of creating macros which
* make exporting from a DLL simpler. All files within this DLL are
* compiled with the XQILLA_APIS symbol defined on the command line.
* this symbol should not be defined on any project that uses this DLL.
* This way any other project whose source files include this file see
* XQILLA_API functions as being imported from a DLL, wheras this DLL
* sees symbols defined with this macro as being exported.
*/
2020-02-17 21:24:47 +00:00
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW__)
2020-02-17 21:13:50 +00:00
# if !defined(XQILLA_API)
# if defined(XQILLA_APIS)
# define XQILLA_API __declspec(dllexport)
# else
# define XQILLA_API __declspec(dllimport)
# endif
# endif
2020-02-17 21:11:31 +00:00
2020-02-17 21:13:50 +00:00
# if !defined(__MINGW32__)
# pragma warning(disable: 4251 4786 4101 4290)
# endif
2020-02-17 21:05:20 +00:00
#else
2020-02-17 21:13:50 +00:00
# define XQILLA_API
2020-02-17 21:05:20 +00:00
#endif
#endif