From c581055b5447a9355244e618075700d157a94978 Mon Sep 17 00:00:00 2001
From: Kurt Zeilenga <kurt@openldap.org>
Date: Mon, 31 May 1999 21:19:07 +0000
Subject: [PATCH] Add skeleton ldap_extended_operation routines.

---
 libraries/libldap/Makefile.in   |  4 +--
 libraries/libldap/extended.c    | 43 +++++++++++++++++++++++++++++++++
 libraries/libldap_r/Makefile.in |  5 ++--
 3 files changed, 48 insertions(+), 4 deletions(-)
 create mode 100644 libraries/libldap/extended.c

diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in
index 5c5cd30ca0..3b03eb3f31 100644
--- a/libraries/libldap/Makefile.in
+++ b/libraries/libldap/Makefile.in
@@ -9,7 +9,7 @@ XLIBRARY = ../libldap.a
 PROGRAMS = apitest ltest ttest
 
 SRCS	= bind.c open.c result.c error.c compare.c search.c \
-	controls.c messages.c references.c \
+	controls.c messages.c references.c extended.c \
 	modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \
 	getfilter.c sbind.c kbind.c unbind.c friendly.c cldap.c \
 	free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \
@@ -17,7 +17,7 @@ SRCS	= bind.c open.c result.c error.c compare.c search.c \
 	request.c getdxbyname.c os-ip.c url.c charset.c \
 	init.c options.c print.c string.c util-int.c schema.c
 OBJS	= bind.lo open.lo result.lo error.lo compare.lo search.lo \
-	controls.lo messages.lo references.lo \
+	controls.lo messages.lo references.lo extended.lo \
 	modify.lo add.lo modrdn.lo delete.lo abandon.lo ufn.lo cache.lo \
 	getfilter.lo sbind.lo kbind.lo unbind.lo friendly.lo cldap.lo \
 	free.lo disptmpl.lo srchpref.lo dsparse.lo tmplout.lo sort.lo \
diff --git a/libraries/libldap/extended.c b/libraries/libldap/extended.c
new file mode 100644
index 0000000000..d9b221cf87
--- /dev/null
+++ b/libraries/libldap/extended.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#include "ldap-int.h"
+
+int
+ldap_extended_operation(
+	LDAP			*ld,
+	LDAP_CONST char	*exoid,
+	struct berval	*exdata,
+	LDAPControl		**sctrls,
+	LDAPControl		**cctrls,
+	int				*msgidp )
+{
+	Debug( LDAP_DEBUG_TRACE, "ldap_extended_operation\n", 0, 0, 0 );
+	return LDAP_NOT_SUPPORTED;
+}
+
+int
+ldap_extended_operation_s(
+	LDAP			*ld,
+	LDAP_CONST char	*exoid,
+	struct berval	*exdata,
+	LDAPControl		**sctrls,
+	LDAPControl		**cctrls,
+	char			**retoidp,
+	struct berval	**retdatap )
+{
+	Debug( LDAP_DEBUG_TRACE, "ldap_extended_operation_s\n", 0, 0, 0 );
+	return LDAP_NOT_SUPPORTED;
+}
+
diff --git a/libraries/libldap_r/Makefile.in b/libraries/libldap_r/Makefile.in
index 8f36557038..a070a8219a 100644
--- a/libraries/libldap_r/Makefile.in
+++ b/libraries/libldap_r/Makefile.in
@@ -7,7 +7,7 @@ XLIBRARY = ../libldap_r.a
 PROGRAMS = apitest ltest ttest
 
 XXDIR = $(srcdir)/../libldap
-XXSRCS	= apitest.c test.c tmpltest.c \
+XXSRCS	= apitest.c test.c tmpltest.c extended.c \
 	bind.c controls.c open.c result.c error.c compare.c search.c \
 	modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \
 	getfilter.c sbind.c kbind.c unbind.c friendly.c cldap.c \
@@ -17,7 +17,8 @@ XXSRCS	= apitest.c test.c tmpltest.c \
 	init.c options.c print.c string.c util-int.c schema.c
 SRCS	= thr_posix.c thr_cthreads.c thr_thr.c thr_lwp.c thr_nt.c \
 	thr_sleep.c thr_stub.c rdwr.c
-OBJS	= bind.lo controls.lo open.lo result.lo error.lo compare.lo search.lo \
+OBJS	= extended.lo \
+	bind.lo controls.lo open.lo result.lo error.lo compare.lo search.lo \
 	modify.lo add.lo modrdn.lo delete.lo abandon.lo ufn.lo cache.lo \
 	getfilter.lo sbind.lo kbind.lo unbind.lo friendly.lo cldap.lo \
 	free.lo disptmpl.lo srchpref.lo dsparse.lo tmplout.lo sort.lo \
-- 
GitLab