* autofs-5.1.8 - define LDAP_DEPRECATED during LDAP configure check
@ 2023-09-29 10:00 Florian Weimer
2023-09-30 1:33 ` Ian Kent
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2023-09-29 10:00 UTC (permalink / raw)
To: autofs; +Cc: Arjun Shankar
From: Arjun Shankar <arjun@redhat.com>
This commit defines LDAP_DEPRECATED as 1 during a configure check for
ldap_parse_page_control. This is in line with how lookup_ldap.c is
compiled at build time. Also tweak the type of ct to avoid an
-Wint-conversion warning.
The configure script is regenerated with autoconf 2.69.
The regeneration of the configure script also includes changes due to
commit 69fda4f090e3. That commit intended to run checks with implicit
function declaration warnings enabled in order to recognize missing
libldap functions. However, the in-tree copy of the configure script
was not regenerated at that time.
Signed-off-by: Arjun Shankar <arjun@redhat.com>
Signed-off-by: Florian Weimer <fweimer@redhat.com>
---
Resubmitting because apparently this got never merged, also added
the -Wint-conversion fix.
aclocal.m4 | 5 +++--
configure | 11 +++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 33561aaeb9f5eaa4..1920672d37d25a27 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -368,9 +368,10 @@ af_check_ldap_parse_page_control_save_libs="$LIBS"
LIBS="$LIBS -lldap"
AC_TRY_LINK(
- [ #include <ldap.h> ],
+ [ #define LDAP_DEPRECATED 1
+ #include <ldap.h> ],
[ LDAP *ld;
- ber_int_t ct;
+ ber_int_t *ct;
struct berval *c;
int ret;
LDAPControl **clp;
diff --git a/configure b/configure
index 394a8d55121c12ed..c84ef2a94d1df1b4 100755
--- a/configure
+++ b/configure
@@ -5407,6 +5407,8 @@ $as_echo_n "checking for ldap_create_page_control in -lldap... " >&6; }
# save current libs
af_check_ldap_create_page_control_save_libs="$LIBS"
LIBS="$LIBS -lldap"
+af_check_ldap_create_page_control_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5443,6 +5445,7 @@ fi
# restore libs
LIBS="$af_check_ldap_create_page_control_save_libs"
+CFLAGS="$af_check_ldap_create_page_control_save_cflags"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_parse_page_control in -lldap" >&5
$as_echo_n "checking for ldap_parse_page_control in -lldap... " >&6; }
@@ -5450,15 +5453,18 @@ $as_echo_n "checking for ldap_parse_page_control in -lldap... " >&6; }
# save current libs
af_check_ldap_parse_page_control_save_libs="$LIBS"
LIBS="$LIBS -lldap"
+af_check_ldap_parse_page_control_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <ldap.h>
+ #define LDAP_DEPRECATED 1
+ #include <ldap.h>
int
main ()
{
LDAP *ld;
- ber_int_t ct;
+ ber_int_t *ct;
struct berval *c;
int ret;
LDAPControl **clp;
@@ -5486,6 +5492,7 @@ fi
# restore libs
LIBS="$af_check_ldap_parse_page_control_save_libs"
+CFLAGS="$af_check_ldap_parse_page_control_save_cflags"
fi
base-commit: ab70c4c070d8e21cd51df93f7a603788aa50dd5f
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: autofs-5.1.8 - define LDAP_DEPRECATED during LDAP configure check
2023-09-29 10:00 autofs-5.1.8 - define LDAP_DEPRECATED during LDAP configure check Florian Weimer
@ 2023-09-30 1:33 ` Ian Kent
0 siblings, 0 replies; 2+ messages in thread
From: Ian Kent @ 2023-09-30 1:33 UTC (permalink / raw)
To: Florian Weimer, autofs; +Cc: Arjun Shankar
On 29/9/23 18:00, Florian Weimer wrote:
> From: Arjun Shankar <arjun@redhat.com>
>
> This commit defines LDAP_DEPRECATED as 1 during a configure check for
> ldap_parse_page_control. This is in line with how lookup_ldap.c is
> compiled at build time. Also tweak the type of ct to avoid an
> -Wint-conversion warning.
>
> The configure script is regenerated with autoconf 2.69.
>
> The regeneration of the configure script also includes changes due to
> commit 69fda4f090e3. That commit intended to run checks with implicit
> function declaration warnings enabled in order to recognize missing
> libldap functions. However, the in-tree copy of the configure script
> was not regenerated at that time.
>
> Signed-off-by: Arjun Shankar <arjun@redhat.com>
> Signed-off-by: Florian Weimer <fweimer@redhat.com>
>
> ---
> Resubmitting because apparently this got never merged, also added
> the -Wint-conversion fix.
Umm, ok, I admit I don't remember this.
I'll have a look at it and include it in my next commit.
I need to start working on a release, it's way overdue, so this should
be generally available fairly soon.
Ian
>
> aclocal.m4 | 5 +++--
> configure | 11 +++++++++--
> 2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/aclocal.m4 b/aclocal.m4
> index 33561aaeb9f5eaa4..1920672d37d25a27 100644
> --- a/aclocal.m4
> +++ b/aclocal.m4
> @@ -368,9 +368,10 @@ af_check_ldap_parse_page_control_save_libs="$LIBS"
> LIBS="$LIBS -lldap"
>
> AC_TRY_LINK(
> - [ #include <ldap.h> ],
> + [ #define LDAP_DEPRECATED 1
> + #include <ldap.h> ],
> [ LDAP *ld;
> - ber_int_t ct;
> + ber_int_t *ct;
> struct berval *c;
> int ret;
> LDAPControl **clp;
> diff --git a/configure b/configure
> index 394a8d55121c12ed..c84ef2a94d1df1b4 100755
> --- a/configure
> +++ b/configure
> @@ -5407,6 +5407,8 @@ $as_echo_n "checking for ldap_create_page_control in -lldap... " >&6; }
> # save current libs
> af_check_ldap_create_page_control_save_libs="$LIBS"
> LIBS="$LIBS -lldap"
> +af_check_ldap_create_page_control_save_cflags="$CFLAGS"
> +CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
>
> cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> /* end confdefs.h. */
> @@ -5443,6 +5445,7 @@ fi
>
> # restore libs
> LIBS="$af_check_ldap_create_page_control_save_libs"
> +CFLAGS="$af_check_ldap_create_page_control_save_cflags"
>
> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_parse_page_control in -lldap" >&5
> $as_echo_n "checking for ldap_parse_page_control in -lldap... " >&6; }
> @@ -5450,15 +5453,18 @@ $as_echo_n "checking for ldap_parse_page_control in -lldap... " >&6; }
> # save current libs
> af_check_ldap_parse_page_control_save_libs="$LIBS"
> LIBS="$LIBS -lldap"
> +af_check_ldap_parse_page_control_save_cflags="$CFLAGS"
> +CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
>
> cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> /* end confdefs.h. */
> - #include <ldap.h>
> + #define LDAP_DEPRECATED 1
> + #include <ldap.h>
> int
> main ()
> {
> LDAP *ld;
> - ber_int_t ct;
> + ber_int_t *ct;
> struct berval *c;
> int ret;
> LDAPControl **clp;
> @@ -5486,6 +5492,7 @@ fi
>
> # restore libs
> LIBS="$af_check_ldap_parse_page_control_save_libs"
> +CFLAGS="$af_check_ldap_parse_page_control_save_cflags"
>
> fi
>
>
> base-commit: ab70c4c070d8e21cd51df93f7a603788aa50dd5f
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-30 1:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-29 10:00 autofs-5.1.8 - define LDAP_DEPRECATED during LDAP configure check Florian Weimer
2023-09-30 1:33 ` Ian Kent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).