aboutsummaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2007-06-22 18:47:16 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2007-06-22 18:47:16 +0000
commit65f9b75e71f9ec13c6b0d86a7ddce50f58369a74 (patch)
treeb39c382d9186dfe6c0587d552035c3f1423dbd14 /src/windows
parentf7a95afcc719e5641081451eb30155f365286267 (diff)
downloadkrb5-65f9b75e71f9ec13c6b0d86a7ddce50f58369a74.zip
krb5-65f9b75e71f9ec13c6b0d86a7ddce50f58369a74.tar.gz
krb5-65f9b75e71f9ec13c6b0d86a7ddce50f58369a74.tar.bz2
All exports in nidmgr32.dll are declared as __declspec(dllexport)
using the KHMEXP macro in the header files. However, since the same header files are used to declare imports when building applications and plug-ins that use nidmgr32.dll, the KHMEXP macro should switch to __declspec(import) so that the relevant import table entries are created. To make this switch, the source files that go into nidmgr32.dll are compiled with the special macro _NIMLIB_ defined that indicates that the KHMEXP should expand to __declspec(dllexport). In the absence of this macro, KHMEXP will expand to __declspec(dllimport). ticket: 5584 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19618 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/identity/include/khdefs.h5
-rw-r--r--src/windows/identity/kconfig/kconfiginternal.h2
-rw-r--r--src/windows/identity/kcreddb/kcreddbinternal.h2
-rw-r--r--src/windows/identity/kherr/kherrinternal.h2
-rw-r--r--src/windows/identity/kmm/kmminternal.h2
-rw-r--r--src/windows/identity/kmm/kplugin.h6
-rw-r--r--src/windows/identity/kmq/kmqinternal.h2
-rw-r--r--src/windows/identity/plugins/krb4/krb4main.c4
-rw-r--r--src/windows/identity/plugins/krb4/krbcred.h2
-rw-r--r--src/windows/identity/plugins/krb5/krb5main.c4
-rw-r--r--src/windows/identity/plugins/krb5/krbcred.h2
-rw-r--r--src/windows/identity/uilib/action.c2
-rw-r--r--src/windows/identity/uilib/alert.c3
-rw-r--r--src/windows/identity/uilib/configui.c2
-rw-r--r--src/windows/identity/uilib/creddlg.c2
-rw-r--r--src/windows/identity/uilib/propsheet.c2
-rw-r--r--src/windows/identity/uilib/propwnd.c2
-rw-r--r--src/windows/identity/uilib/rescache.c1
-rw-r--r--src/windows/identity/uilib/trackerwnd.c3
-rw-r--r--src/windows/identity/uilib/uibind.c3
-rw-r--r--src/windows/identity/uilib/uilibmain.c2
-rw-r--r--src/windows/identity/uilib/version.c2
-rw-r--r--src/windows/identity/util/hashtable.c2
-rw-r--r--src/windows/identity/util/mstring.c2
-rw-r--r--src/windows/identity/util/perfstat.c2
-rw-r--r--src/windows/identity/util/sync.c2
26 files changed, 54 insertions, 11 deletions
diff --git a/src/windows/identity/include/khdefs.h b/src/windows/identity/include/khdefs.h
index 0d32356..c39d6f4 100644
--- a/src/windows/identity/include/khdefs.h
+++ b/src/windows/identity/include/khdefs.h
@@ -177,7 +177,12 @@ typedef unsigned __int64 khm_lparm;
#define KHMEXP_EXP __declspec(dllexport)
#define KHMEXP_IMP __declspec(dllimport)
+#ifdef _NIMLIB_
#define KHMEXP KHMEXP_EXP
+#else
+#define KHMEXP KHMEXP_IMP
+#endif
+
#endif
/* Generic permission values */
diff --git a/src/windows/identity/kconfig/kconfiginternal.h b/src/windows/identity/kconfig/kconfiginternal.h
index dc1bfa3..cd65877 100644
--- a/src/windows/identity/kconfig/kconfiginternal.h
+++ b/src/windows/identity/kconfig/kconfiginternal.h
@@ -27,6 +27,8 @@
#ifndef __KHIMAIRA_KCONFIGINTERNAL_H
#define __KHIMAIRA_KCONFIGINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<kconfig.h>
#include<khlist.h>
diff --git a/src/windows/identity/kcreddb/kcreddbinternal.h b/src/windows/identity/kcreddb/kcreddbinternal.h
index 2b80d18..ac07aa7 100644
--- a/src/windows/identity/kcreddb/kcreddbinternal.h
+++ b/src/windows/identity/kcreddb/kcreddbinternal.h
@@ -27,6 +27,8 @@
#ifndef __KHIMAIRA_KCREDDBINTERNAL_H__
#define __KHIMAIRA_KCREDDBINTERNAL_H__
+#define _NIMLIB_
+
#include<windows.h>
#include<kcreddb.h>
#include<kmq.h>
diff --git a/src/windows/identity/kherr/kherrinternal.h b/src/windows/identity/kherr/kherrinternal.h
index fb6412a..b57686c 100644
--- a/src/windows/identity/kherr/kherrinternal.h
+++ b/src/windows/identity/kherr/kherrinternal.h
@@ -27,6 +27,8 @@
#ifndef __KHIMAIRA_KHERRORINTERNAL_H
#define __KHIMAIRA_KHERRORINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<kherr.h>
#include<utils.h>
diff --git a/src/windows/identity/kmm/kmminternal.h b/src/windows/identity/kmm/kmminternal.h
index 1712e97..b945d35 100644
--- a/src/windows/identity/kmm/kmminternal.h
+++ b/src/windows/identity/kmm/kmminternal.h
@@ -27,6 +27,8 @@
#ifndef __KHIMAIRA_KMMINTERNAL_H
#define __KHIMAIRA_KMMINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<shlwapi.h>
#include<strsafe.h>
diff --git a/src/windows/identity/kmm/kplugin.h b/src/windows/identity/kmm/kplugin.h
index 6eb4e13..a5b7a08 100644
--- a/src/windows/identity/kmm/kplugin.h
+++ b/src/windows/identity/kmm/kplugin.h
@@ -84,7 +84,7 @@ plugin.
\note This callback is required.
*/
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
+KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module);
/*! \brief Type for init_module() */
typedef khm_int32 (KHMAPI *init_module_t)(kmm_module);
@@ -104,7 +104,7 @@ typedef khm_int32 (KHMAPI *init_module_t)(kmm_module);
Essentially, this is a message subscriber for KMQ messages.
*/
-KHMEXP khm_int32 KHMAPI _plugin_proc(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+KHMEXP_EXP khm_int32 KHMAPI _plugin_proc(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
/*! \brief Type for init_plugin() */
typedef kmq_callback_t _plugin_proc_t;
@@ -127,7 +127,7 @@ typedef kmq_callback_t _plugin_proc_t;
\note This callback is not required.
*/
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
+KHMEXP_EXP khm_int32 KHMAPI exit_module(kmm_module h_module);
/*! \brief Type for exit_module() */
typedef khm_int32 (KHMAPI *exit_module_t)(kmm_module);
diff --git a/src/windows/identity/kmq/kmqinternal.h b/src/windows/identity/kmq/kmqinternal.h
index bd97f1b..8ae0ab6 100644
--- a/src/windows/identity/kmq/kmqinternal.h
+++ b/src/windows/identity/kmq/kmqinternal.h
@@ -27,6 +27,8 @@
#ifndef __KHIMAIRA_KMQINTERNAL_H
#define __KHIMAIRA_KMQINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<kmq.h>
#include<khlist.h>
diff --git a/src/windows/identity/plugins/krb4/krb4main.c b/src/windows/identity/plugins/krb4/krb4main.c
index 7ab2d71..6b1c395 100644
--- a/src/windows/identity/plugins/krb4/krb4main.c
+++ b/src/windows/identity/plugins/krb4/krb4main.c
@@ -58,7 +58,7 @@ void exit_krb() {
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
khm_int32 rv = KHM_ERROR_SUCCESS;
kmm_plugin_reg pi;
wchar_t buf[256];
@@ -107,7 +107,7 @@ KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module) {
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
exit_imports();
exit_error_funcs();
diff --git a/src/windows/identity/plugins/krb4/krbcred.h b/src/windows/identity/plugins/krb4/krbcred.h
index 53e22c8..0b6a148 100644
--- a/src/windows/identity/plugins/krb4/krbcred.h
+++ b/src/windows/identity/plugins/krb4/krbcred.h
@@ -56,8 +56,6 @@
void init_krb();
void exit_krb();
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
/* globals */
extern kmm_module h_khModule;
diff --git a/src/windows/identity/plugins/krb5/krb5main.c b/src/windows/identity/plugins/krb5/krb5main.c
index befa7a9..4875a80 100644
--- a/src/windows/identity/plugins/krb5/krb5main.c
+++ b/src/windows/identity/plugins/krb5/krb5main.c
@@ -81,7 +81,7 @@ void exit_krb() {
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
khm_int32 rv = KHM_ERROR_SUCCESS;
kmm_plugin_reg pi;
wchar_t buf[256];
@@ -426,7 +426,7 @@ _exit:
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
exit_imports();
exit_error_funcs();
diff --git a/src/windows/identity/plugins/krb5/krbcred.h b/src/windows/identity/plugins/krb5/krbcred.h
index 0048f71..a194343 100644
--- a/src/windows/identity/plugins/krb5/krbcred.h
+++ b/src/windows/identity/plugins/krb5/krbcred.h
@@ -73,8 +73,6 @@ typedef enum tag_k5_lsa_import {
void init_krb();
void exit_krb();
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
/* globals */
extern kmm_module h_khModule;
diff --git a/src/windows/identity/uilib/action.c b/src/windows/identity/uilib/action.c
index d555662..be3860c 100644
--- a/src/windows/identity/uilib/action.c
+++ b/src/windows/identity/uilib/action.c
@@ -26,6 +26,8 @@
/* $Id$ */
#define NOEXPORT
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<intaction.h>
#include<utils.h>
diff --git a/src/windows/identity/uilib/alert.c b/src/windows/identity/uilib/alert.c
index 376eab6..02df7a1 100644
--- a/src/windows/identity/uilib/alert.c
+++ b/src/windows/identity/uilib/alert.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<utils.h>
#include<intalert.h>
@@ -35,6 +37,7 @@
Alerter
***********************************************************************/
+
khui_alert * kh_alerts = NULL;
CRITICAL_SECTION cs_alerts;
diff --git a/src/windows/identity/uilib/configui.c b/src/windows/identity/uilib/configui.c
index 3de2573..f2994d8 100644
--- a/src/windows/identity/uilib/configui.c
+++ b/src/windows/identity/uilib/configui.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<kmm.h>
#include<configui.h>
diff --git a/src/windows/identity/uilib/creddlg.c b/src/windows/identity/uilib/creddlg.c
index 08b0a14..eb88381 100644
--- a/src/windows/identity/uilib/creddlg.c
+++ b/src/windows/identity/uilib/creddlg.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<utils.h>
#include<assert.h>
diff --git a/src/windows/identity/uilib/propsheet.c b/src/windows/identity/uilib/propsheet.c
index 55c6cbb..068bcf0 100644
--- a/src/windows/identity/uilib/propsheet.c
+++ b/src/windows/identity/uilib/propsheet.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<utils.h>
#ifdef DEBUG
diff --git a/src/windows/identity/uilib/propwnd.c b/src/windows/identity/uilib/propwnd.c
index 2116f5e..ea36e28 100644
--- a/src/windows/identity/uilib/propwnd.c
+++ b/src/windows/identity/uilib/propwnd.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
diff --git a/src/windows/identity/uilib/rescache.c b/src/windows/identity/uilib/rescache.c
index 3134df8..7715cfd 100644
--- a/src/windows/identity/uilib/rescache.c
+++ b/src/windows/identity/uilib/rescache.c
@@ -25,6 +25,7 @@
/* $Id$ */
#define NOEXPORT
+#define _NIMLIB_
#include<khuidefs.h>
#include<utils.h>
diff --git a/src/windows/identity/uilib/trackerwnd.c b/src/windows/identity/uilib/trackerwnd.c
index 1ec2fda..cc434d9 100644
--- a/src/windows/identity/uilib/trackerwnd.c
+++ b/src/windows/identity/uilib/trackerwnd.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<commctrl.h>
#include<assert.h>
@@ -472,3 +474,4 @@ khui_tracker_kill_controls(khui_tracker * tc) {
}
+
diff --git a/src/windows/identity/uilib/uibind.c b/src/windows/identity/uilib/uibind.c
index be183b6..f2f44cc 100644
--- a/src/windows/identity/uilib/uibind.c
+++ b/src/windows/identity/uilib/uibind.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<intaction.h>
@@ -57,3 +59,4 @@ khui_request_UI_callback(khm_ui_callback cb, void * rock) {
}
+
diff --git a/src/windows/identity/uilib/uilibmain.c b/src/windows/identity/uilib/uilibmain.c
index 5c13ad4..25cbcfe 100644
--- a/src/windows/identity/uilib/uilibmain.c
+++ b/src/windows/identity/uilib/uilibmain.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
extern void alert_init(void);
diff --git a/src/windows/identity/uilib/version.c b/src/windows/identity/uilib/version.c
index 6e3e48f..50a1554 100644
--- a/src/windows/identity/uilib/version.c
+++ b/src/windows/identity/uilib/version.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<shlwapi.h>
#include<khuidefs.h>
#include<netidmgr_intver.h>
diff --git a/src/windows/identity/util/hashtable.c b/src/windows/identity/util/hashtable.c
index 5773d80..7836179 100644
--- a/src/windows/identity/util/hashtable.c
+++ b/src/windows/identity/util/hashtable.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<perfstat.h>
#include<hashtable.h>
#include<stdlib.h>
diff --git a/src/windows/identity/util/mstring.c b/src/windows/identity/util/mstring.c
index d9eb9d3..176afc4 100644
--- a/src/windows/identity/util/mstring.c
+++ b/src/windows/identity/util/mstring.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<mstring.h>
#include<kherror.h>
#include<strsafe.h>
diff --git a/src/windows/identity/util/perfstat.c b/src/windows/identity/util/perfstat.c
index 6a9dd81..bcde1f2 100644
--- a/src/windows/identity/util/perfstat.c
+++ b/src/windows/identity/util/perfstat.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<windows.h>
#include<utils.h>
#include<malloc.h>
diff --git a/src/windows/identity/util/sync.c b/src/windows/identity/util/sync.c
index c829ada..ba20424 100644
--- a/src/windows/identity/util/sync.c
+++ b/src/windows/identity/util/sync.c
@@ -24,6 +24,8 @@
/* $Id$ */
+#define _NIMLIB_
+
#include<windows.h>
#include<sync.h>
#include<assert.h>