Issue 578 - Function prototypes in libldap and liblber
Summary: Function prototypes in libldap and liblber
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-06-08 18:30 UTC by Steve Sonntag
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kurt Zeilenga 2000-06-08 14:52:10 UTC
moved from Incoming to Development
Comment 1 Kurt Zeilenga 2000-06-08 14:53:03 UTC
changed notes
changed state Open to Feedback
Comment 2 Steve Sonntag 2000-06-08 18:30:32 UTC
Full_Name: Alan Clark
Version: devel
OS: Linux / NetWare / WinNT
URL: ftp://ftp.openldap.org/incoming/aclark-000608

The enclosed patch cleans up externally visible
function declarations in libldap and liblber.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please note the following items that still need to be fixed:

ldap_is_ldap_url(), ldap_is_ldaps_url() are declared in ldap.h
  but ldap_is_ldapi_url() is not.

ldap_rename_ext(), and ldap_rename_ext_s are defined in ldap.h
but no code exists to support these function.

ldap_parent_dn(), ldap_relative_dn(), ldap_normalize_dn()
are defined in ldap.h but no code exists to support these function.

ldap_unbind_ext_s() is defined in ldap.h but no code exists to
support this function.

ber_print_error() is defined in lber.h.  The function in the code is ber_error_print.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

The following is a brief description of the changes:

The header file libldap.h declares functions with the form

LIBLDAP_F( char *)
ldap_err2string LDAP_P((
     int err ));

But the function in the code is declared as:

char *ldap_errstring( int err)

where it should be 

LIBLDAP_F(char *)
ldap_errstring( int err)

I seemed to me that only externally visible functions
should be declared in this way in libldap and liblber.
If I am wrong, slap my hand.

This patch fixes all functions in the declared in the
external headers ldap.h and lber.h.

I also created a new macro LIBLBER_V for variables
which may need a slightly different syntax than functions.
Currently the only external variables are in liblber.

I removed the LIBLDAP_F and LIBLBER_F from the headers
ldap-int.h and lber-int.h and left the actual functions
unchanged.

The code also has the benefical side effect for win32 that
applications compiling with the headers get their ldap calls
compiled with the calling convention that the library is built
with.

-Steve Sonntag

-Alan Clark
Manager
Novell Directory Services
Comment 3 Kurt Zeilenga 2000-09-02 15:05:29 UTC
moved from Development to Software Enhancements
Comment 4 Kurt Zeilenga 2000-09-06 10:23:01 UTC
moved from Software Enhancements to Development
Comment 5 Kurt Zeilenga 2000-10-30 15:41:21 UTC
moved from Development to Contrib
Comment 6 Kurt Zeilenga 2001-05-07 17:41:36 UTC
moved from Contrib to Development
Comment 7 Kurt Zeilenga 2001-09-09 14:35:52 UTC
changed notes
changed state Feedback to Closed
Comment 8 OpenLDAP project 2014-08-01 21:05:27 UTC
Dave to resolve