Commit 106fd935 authored by Pekka Pessi's avatar Pekka Pessi

Updated _DLL linkage things.

The DLL linkage macros SIP_DLL, NTA_DLL, etc. are now defined in win32-specific
config.h file.

darcs-hash:20051031173728-65a35-3730d7fd7c6f782fa393c640625ecf38250b2d54.gz
parent 279c1d63
......@@ -147,13 +147,14 @@ enum {
bnf_param = bnf_token | bnf_param0 /**< SIP/HTTP parameter */
};
#if defined(WIN32)
#if defined(BNF_EXPORTS)
__declspec(dllexport)
#ifndef BNF_DLL
#ifndef WIN32
#define BNF_DLL
#else
__declspec(dllimport)
#define BNF_DLL __declspec(dllimport)
#endif
#endif
BNF_DLL
/** Table for determining class of a character */
extern unsigned char const _bnf_table[256];
......
......@@ -474,14 +474,6 @@ union http_header_u {
};
/* Define declaration specification for exporting things from a shared lib */
#if !defined(WIN32)
#define HTTP_DLL
#elif defined(HTTP_EXPORTS)
#define HTTP_DLL __declspec(dllexport)
#else
#define HTTP_DLL __declspec(dllimport)
#endif
#include <http_dll.h>
#endif /* !defined(HTTP_H) */
......@@ -24,10 +24,10 @@
/* Define declaration specification for exporting things from a shared lib */
#if !defined(WIN32)
#ifndef HTTP_DLL
#ifndef WIN32
#define HTTP_DLL
#elif defined(HTTP_EXPORTS)
#define HTTP_DLL __declspec(dllexport)
#else
#define HTTP_DLL __declspec(dllimport)
#endif
#endif
......@@ -50,8 +50,6 @@
#include <msg_header.h>
#endif
#include <http_dll.h>
/* ----------------------------------------------------------------------
* 1) Macros
*/
......
......@@ -25,7 +25,6 @@
#ifndef HTTP_STATUS_H
#define HTTP_STATUS_H
/**@file http_status.h
*
* HTTP status codes.
......
......@@ -59,10 +59,12 @@ typedef unsigned char ucs1;
typedef unsigned short ucs2;
typedef unsigned int ucs4;
#ifdef IPT_EXPORTS
__declspec(dllexport)
#elif defined(WIN32)
__declspec(dllimport)
#ifndef IPT_DLL
#ifndef WIN32
#define IPT_DLL
#else
#define IPT_DLL __declspec(dllimport)
#endif
#endif
size_t utf8_width(const utf8 *);
......
......@@ -27,12 +27,12 @@
/**Define declaration specifications for exporting things from @b iptsec.dll.
*/
#if !defined(WIN32)
#ifndef AUTH_DLL
#ifndef WIN32
#define AUTH_DLL
#elif defined(IPTSEC_EXPORTS)
#define AUTH_DLL __declspec(dllexport)
#else
#define AUTH_DLL __declspec(dllimport)
#endif
#endif
#endif
......@@ -31,16 +31,16 @@
*
*/
#if !defined(WIN32)
#ifndef MSG_DLL
#ifndef WIN32
/** Attribute for symbols exported from msg library */
#define MSG_DLL
#define MSG_TEST_DLL
#elif defined(MSG_EXPORTS)
#define MSG_DLL __declspec(dllexport)
#define MSG_TEST_DLL __declspec(dllexport)
#else
#define MSG_DLL __declspec(dllimport)
#define MSG_TEST_DLL __declspec(dllimport)
#endif
#endif
/** Attribute for msg test symbols */
#define MSG_TEST_DLL
#endif /** !defined(MSG_DLL_H) */
......@@ -36,14 +36,6 @@
*
*/
#if !defined(WIN32)
#define NEA_DLL
#elif defined(NEA_EXPORTS)
#define NEA_DLL __declspec(dllexport)
#else
#define NEA_DLL __declspec(dllimport)
#endif
#ifndef SU_ALLOC_H
#include <su_alloc.h>
#endif
......@@ -60,6 +52,14 @@
#define NEA_DEFAULT_EXPIRES 3600
#ifndef NEA_DLL
#ifndef WIN32
#define NEA_DLL
#else
#define NEA_DLL __declspec(dllimport)
#endif
#endif
/** Event notifier object. */
typedef struct nea_server_s nea_server_t;
......
......@@ -33,12 +33,13 @@
*
* @date Created: Fri Feb 22 15:57:00 2002 ppessi
*/
#if !defined(WIN32)
#ifndef NTA_DLL
#ifndef WIN32
#define NTA_DLL
#elif defined(NTA_EXPORTS)
#define NTA_DLL __declspec(dllexport)
#else
#define NTA_DLL __declspec(dllimport)
#endif
#endif
#endif /* !defined(NTA_DLL_H) */
......@@ -46,13 +46,13 @@
#include <http_tag.h>
#endif
#if !defined(WIN32)
#ifndef NTH_DLL
#ifndef WIN32
#define NTH_DLL
#elif defined(NTH_EXPORTS)
#define NTH_DLL __declspec(dllexport)
#else
#define NTH_DLL __declspec(dllimport)
#endif
#endif
NTH_DLL extern tagi_t nth_client_tags[];
......
......@@ -40,14 +40,6 @@
#include <su_types.h>
#endif
#if !defined(WIN32)
#define SDP_DLL
#elif defined(SDP_EXPORTS)
#define SDP_DLL __declspec(dllexport)
#else
#define SDP_DLL __declspec(dllimport)
#endif
/** SDP session description */
typedef struct sdp_session_s sdp_session_t;
/** SDP version "v=" line */
......
......@@ -42,14 +42,13 @@
#include <su_tag_class.h>
#endif
#if defined(SDP_DLL)
#elif !defined(WIN32)
#ifndef SDP_DLL
#ifndef WIN32
#define SDP_DLL
#elif defined(SDP_EXPORTS)
#define SDP_DLL __declspec(dllexport)
#else
#define SDP_DLL __declspec(dllimport)
#endif
#endif
struct sdp_session_s;
......
......@@ -32,13 +32,12 @@
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*/
#if !defined(WIN32)
/** Attribute for symbols exported from sip() library */
#ifndef SIP_DLL
#ifndef WIN32
#define SIP_DLL
#elif defined(SIP_EXPORTS)
#define SIP_DLL __declspec(dllexport)
#else
#define SIP_DLL __declspec(dllimport)
#define SIP_DLL __declspec(dllimport)
#endif
#endif
#endif
......@@ -36,20 +36,16 @@
* @date Last modified: Wed Jul 20 20:35:57 2005 kaiv
*/
#if !defined(_WIN32)
#ifndef _WIN32
# include <su_configure.h>
# define SU_DLL
#else
# include <su_configure_win32.h>
# if !defined(_DLL)
# define SU_DLL
# elif defined(SU_EXPORTS)
# define SU_DLL __declspec(dllexport)
# else
# ifndef SU_DLL
# define SU_DLL __declspec(dllimport)
# endif
#endif
#if defined(__GNUC__)
#if __GNUC__ < 3 && (!defined(__GNUC_MINOR__) || __GNUC_MINOR__ < 96)
#define __malloc__ /* avoid spurious warnigns */
......
......@@ -141,15 +141,6 @@ typedef struct {
#include <tport_tag.h>
#if !defined(WIN32)
#define TPORT_DLL /** Attribute for symbols exported from tport library */
#elif defined(TPORT_EXPORTS)
#define TPORT_DLL __declspec(dllexport)
#else
#define TPORT_DLL __declspec(dllimport)
#endif
/** Create first primary transport. */
tport_t *tport_tcreate(tp_stack_t *stack,
tport_stack_class_t const *tpac,
......
......@@ -34,13 +34,13 @@
* @date Last modified: Wed Jul 20 20:36:01 2005 kaiv
*/
#if !defined(WIN32)
#ifndef TPORT_DLL
#ifndef WIN32
#define TPORT_DLL
#elif defined(TPORT_EXPORTS)
#define TPORT_DLL __declspec(dllexport)
#else
#define TPORT_DLL __declspec(dllimport)
#endif
#endif
#ifndef SU_TAG_H
#include <su_tag.h>
......
......@@ -34,14 +34,13 @@
* @date Last modified: Fri Aug 12 10:42:44 2005 ppessi
*/
#if !defined(WIN32)
/** Attribute for symbols exported from url library */
#ifndef URL_DLL
#ifndef WIN32
#define URL_DLL
#elif defined(URL_EXPORTS)
#define URL_DLL __declspec(dllexport)
#else
#define URL_DLL __declspec(dllimport)
#endif
#endif
#endif /* !defined URL_DLL_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment