Issue #2399 - Fix LDAP on Linux.

This commit is contained in:
Jeremy Andrews 2023-12-01 19:01:18 -06:00 committed by roytam1
commit 54874de6d4
5 changed files with 27 additions and 25 deletions

View file

@ -38,12 +38,23 @@
#ifndef _LBER_H
#define _LBER_H
#include <stdlib.h> /* to pick up size_t typedef */
#ifndef macintosh
#if defined( _WINDOWS ) || defined( _WIN32) || defined( _CONSOLE )
#include <winsock.h> /* for SOCKET */
typedef SOCKET LBER_SOCKET;
#else
typedef long LBER_SOCKET;
#endif /* _WINDOWS */
#else /* macintosh */
typedef void *LBER_SOCKET;
#endif /* macintosh */
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h> /* to pick up size_t typedef */
/*
* Note that LBER_ERROR and LBER_DEFAULT are values that can never appear
* as valid BER tags, and so it is safe to use them to report errors. In
@ -130,16 +141,6 @@ typedef struct berelement BerElement;
typedef struct sockbuf Sockbuf;
typedef int (*BERTranslateProc)( char **bufp, ber_uint_t *buflenp,
int free_input );
#ifndef macintosh
#if defined( _WINDOWS ) || defined( _WIN32) || defined( _CONSOLE )
#include <winsock.h> /* for SOCKET */
typedef SOCKET LBER_SOCKET;
#else
typedef long LBER_SOCKET;
#endif /* _WINDOWS */
#else /* macintosh */
typedef void *LBER_SOCKET;
#endif /* macintosh */
/* calling conventions used by library */
#ifndef LDAP_CALL

View file

@ -40,10 +40,6 @@
#ifndef _LDAP_PLATFORM_H
#define _LDAP_PLATFORM_H
#ifdef __cplusplus
extern "C" {
#endif
#if defined (WIN32) || defined (_WIN32) || defined( _CONSOLE )
#include <windows.h>
# if defined( _WINDOWS )
@ -74,6 +70,10 @@ extern "C" {
#include <sys/select.h>
#endif /* XP_OS2 */
#ifdef __cplusplus
extern "C" {
#endif
/*
* LDAP_API macro definition:
*/

View file

@ -42,14 +42,14 @@
#ifndef _LDAP_STANDARD_H
#define _LDAP_STANDARD_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ldap-platform.h"
#include "lber.h"
#ifdef __cplusplus
extern "C" {
#endif
#define LDAP_PORT 389
#define LDAPS_PORT 636
#define LDAP_VERSION2 2

View file

@ -52,11 +52,12 @@
* 13 August 1993 Mark C Smith
*/
#include "ldap.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "ldap.h"
#if !defined( NEEDPROTOS ) && defined( __STDC__ )
#define NEEDPROTOS

View file

@ -51,10 +51,6 @@
#ifndef _LBERINT_H
#define _LBERINT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <ctype.h>
#include <stdarg.h>
@ -115,6 +111,10 @@ extern "C" {
#include "lber.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef macintosh
#define NSLDAPI_LBER_SOCKET_IS_PTR
#endif