Windows will require C++ clean FreeRADIUS headers
another Windows acceptor-side fix
Conflicts:
moonshot/mech_eap/util.h
/* FreeRADIUS headers */
#ifdef __cplusplus
extern "C" {
/* FreeRADIUS headers */
#ifdef __cplusplus
extern "C" {
#define operator fr_operator
#endif
#define operator fr_operator
#endif
#include <freeradius/libradius.h>
#include <freeradius/radius.h>
#include <freeradius/libradius.h>
#include <freeradius/radius.h>
#include <radsec/radsec.h>
#include <radsec/request.h>
#ifdef __cplusplus
#include <radsec/radsec.h>
#include <radsec/request.h>
#ifdef __cplusplus
}
#endif
#endif /* GSSEAP_ENABLE_ACCEPTOR */
}
#endif
#endif /* GSSEAP_ENABLE_ACCEPTOR */
-#define GSSEAP_GET_LAST_ERROR() (GetLastError())
+#define GSSEAP_GET_LAST_ERROR() (GetLastError()) /* XXX FIXME */
#define GSSEAP_MUTEX CRITICAL_SECTION
#define GSSEAP_MUTEX_INIT(m) (InitializeCriticalSection((m)), 0)
#define GSSEAP_MUTEX_DESTROY(m) DeleteCriticalSection((m))
#define GSSEAP_MUTEX_LOCK(m) EnterCriticalSection((m))
#define GSSEAP_MUTEX_UNLOCK(m) LeaveCriticalSection((m))
#define GSSEAP_MUTEX CRITICAL_SECTION
#define GSSEAP_MUTEX_INIT(m) (InitializeCriticalSection((m)), 0)
#define GSSEAP_MUTEX_DESTROY(m) DeleteCriticalSection((m))
#define GSSEAP_MUTEX_LOCK(m) EnterCriticalSection((m))
#define GSSEAP_MUTEX_UNLOCK(m) LeaveCriticalSection((m))
+#define GSSEAP_ONCE_LEAVE do { return TRUE; } while (0)
/* Thread-local is handled separately */
#define GSSEAP_THREAD_ONCE INIT_ONCE
/* Thread-local is handled separately */
#define GSSEAP_THREAD_ONCE INIT_ONCE
-#define GSSEAP_ONCE(o, i) InitOnceExecuteOnce((o), (i))
+#define GSSEAP_ONCE_CALLBACK(cb) BOOL CALLBACK cb(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
+#define GSSEAP_ONCE(o, i) InitOnceExecuteOnce((o), (i), NULL, NULL)
#define GSSEAP_ONCE_INITIALIZER INIT_ONCE_STATIC_INIT
#else
#include <pthread.h>
#define GSSEAP_ONCE_INITIALIZER INIT_ONCE_STATIC_INIT
#else
#include <pthread.h>
-#define GSSEAP_GET_LAST_ERROR() (errno)
+#define GSSEAP_GET_LAST_ERROR() (errno)
#define GSSEAP_MUTEX pthread_mutex_t
#define GSSEAP_MUTEX_INIT(m) pthread_mutex_init((m), NULL)
#define GSSEAP_MUTEX pthread_mutex_t
#define GSSEAP_MUTEX_INIT(m) pthread_mutex_init((m), NULL)
#define GSSEAP_SETSPECIFIC(k, d) pthread_setspecific((k), (d))
#define GSSEAP_THREAD_ONCE pthread_once_t
#define GSSEAP_SETSPECIFIC(k, d) pthread_setspecific((k), (d))
#define GSSEAP_THREAD_ONCE pthread_once_t
+#define GSSEAP_ONCE_CALLBACK(cb) void cb(void)
#define GSSEAP_ONCE(o, i) pthread_once((o), (i))
#define GSSEAP_ONCE_INITIALIZER PTHREAD_ONCE_INIT
#define GSSEAP_ONCE(o, i) pthread_once((o), (i))
#define GSSEAP_ONCE_INITIALIZER PTHREAD_ONCE_INIT
+#define GSSEAP_ONCE_LEAVE do { } while (0)
static GSSEAP_THREAD_ONCE gssEapAttrProvidersInitOnce = GSSEAP_ONCE_INITIALIZER;
static OM_uint32 gssEapAttrProvidersInitStatus = GSS_S_UNAVAILABLE;
static GSSEAP_THREAD_ONCE gssEapAttrProvidersInitOnce = GSSEAP_ONCE_INITIALIZER;
static OM_uint32 gssEapAttrProvidersInitStatus = GSS_S_UNAVAILABLE;
-static void
-gssEapAttrProvidersInitInternal(void)
+GSSEAP_ONCE_CALLBACK(gssEapAttrProvidersInitInternal)
{
OM_uint32 major, minor;
{
OM_uint32 major, minor;
#endif
gssEapAttrProvidersInitStatus = major;
#endif
gssEapAttrProvidersInitStatus = major;