Skip to content
Snippets Groups Projects
Commit 450b02ca authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

s/WIN32/HAVE_WINSOCK/

remove old Version.c
parent 60a068ae
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
static char Versionstr[] = " bdb2 backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
static char Versionstr[] = " ldbm backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <ac/string.h> #include <ac/string.h>
#include <ac/socket.h> #include <ac/socket.h>
#include <ac/time.h>
#include "slap.h" #include "slap.h"
#include "back-ldbm.h" #include "back-ldbm.h"
......
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
static char Versionstr[] = " passwd backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
/*
* Copyright 1999, John C. Quillan, All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
static char Versionstr[] = " perl backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
static char Versionstr[] = " shell backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
/* $Id: Version.c,v 1.2 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
static char Versionstr[] =
" tcl backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
...@@ -30,15 +30,19 @@ void hit_socket(); ...@@ -30,15 +30,19 @@ void hit_socket();
char *WSAGetLastErrorString(); char *WSAGetLastErrorString();
#define WAKE_LISTENER \ #define WAKE_LISTENER \
do {\
if( wake ) {\ if( wake ) {\
ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );\ ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );\
hit_socket();\ hit_socket();\
} }\
} while(0)
#else #else
#define WAKE_LISTENER \ #define WAKE_LISTENER \
do {\
if( wake ) {\ if( wake ) {\
ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );\ ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );\
} }\
} while(0)
#endif #endif
static int daemon_initialized = 0; static int daemon_initialized = 0;
...@@ -183,16 +187,16 @@ set_socket( struct sockaddr_in *addr ) ...@@ -183,16 +187,16 @@ set_socket( struct sockaddr_in *addr )
int tmp; int tmp;
if ( (tcps = socket( AF_INET, SOCK_STREAM, 0 )) == -1 ) { if ( (tcps = socket( AF_INET, SOCK_STREAM, 0 )) == -1 ) {
#ifndef WIN32 #ifndef HAVE_WINSOCK
int err = errno; int err = errno;
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"daemon: socket() failed errno %d (%s)\n", err, "daemon: socket() failed errno %d (%s)\n", err,
err > -1 && err < sys_nerr ? sys_errlist[err] : err > -1 && err < sys_nerr ? sys_errlist[err] :
"unknown", 0 ); "unknown", 0 );
#endif #else
#ifdef WIN32
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"daemon: socket() failed errno %d (%s)\n", WSAGetLastError(), "daemon: socket() failed errno %d (%s)\n",
WSAGetLastError(),
WSAGetLastErrorString(), 0 ); WSAGetLastErrorString(), 0 );
#endif #endif
exit( 1 ); exit( 1 );
...@@ -621,7 +625,8 @@ int slapd_daemon( int inetd, int tcps ) ...@@ -621,7 +625,8 @@ int slapd_daemon( int inetd, int tcps )
connections_init(); connections_init();
#define SLAPD_LISTENER_THREAD 1 #define SLAPD_LISTENER_THREAD 1
#if SLAPD_LISTENER_THREAD #if defined( SLAPD_LISTENER_THREAD ) || !defined(HAVE_PTHREADS)
/* listener as a separate THREAD */ /* listener as a separate THREAD */
rc = ldap_pvt_thread_create( &listener_tid, rc = ldap_pvt_thread_create( &listener_tid,
0, slapd_daemon_task, args ); 0, slapd_daemon_task, args );
...@@ -721,7 +726,7 @@ void ...@@ -721,7 +726,7 @@ void
slap_set_shutdown( int sig ) slap_set_shutdown( int sig )
{ {
slapd_shutdown = sig; slapd_shutdown = sig;
#ifndef WIN32 #ifndef HAVE_WINSOCK
if(slapd_listener) { if(slapd_listener) {
ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 ); ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );
} }
......
...@@ -25,7 +25,8 @@ static RETSIGTYPE wait4child( int sig ); ...@@ -25,7 +25,8 @@ static RETSIGTYPE wait4child( int sig );
*/ */
#ifndef HAVE_MKVERSION #ifndef HAVE_MKVERSION
const char Versionstr[] = "OpenLDAP Standalone LDAP Server (slapd)"; const char Versionstr[] =
OPENLDAP_PACKAGE " " OPENLDAP_VERSION " Standalone LDAP Server (slapd)";
#endif #endif
#ifdef LOG_LOCAL4 #ifdef LOG_LOCAL4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment