Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 641fbe6

Browse files
committed
Allow configure to detect whether ndbm.h or gdbm/ndbm.h is installed.
This allows dbmmodule.c to use either without having to add additional options to the Modules/Setup file or make source changes. (At least some Linux systems use gdbm to emulate ndbm, but only install the ndbm.h header as /usr/include/gdbm/ndbm.h.)
1 parent e108a02 commit 641fbe6

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

config.h.in

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@
272272
/* The number of bytes in a void *. */
273273
#undef SIZEOF_VOID_P
274274

275-
/* Define if you have the _getpty function. */
276-
#undef HAVE__GETPTY
277-
278275
/* Define if you have the alarm function. */
279276
#undef HAVE_ALARM
280277

@@ -362,6 +359,9 @@
362359
/* Define if you have the getpid function. */
363360
#undef HAVE_GETPID
364361

362+
/* Define if you have the _getpty function. */
363+
#undef HAVE__GETPTY
364+
365365
/* Define if you have the getpwent function. */
366366
#undef HAVE_GETPWENT
367367

@@ -521,12 +521,12 @@
521521
/* Define if you have the waitpid function. */
522522
#undef HAVE_WAITPID
523523

524-
/* Define if you have the <db.h> header file. */
525-
#undef HAVE_DB_H
526-
527524
/* Define if you have the <db_185.h> header file. */
528525
#undef HAVE_DB_185_H
529526

527+
/* Define if you have the <db.h> header file. */
528+
#undef HAVE_DB_H
529+
530530
/* Define if you have the <dirent.h> header file. */
531531
#undef HAVE_DIRENT_H
532532

@@ -536,6 +536,9 @@
536536
/* Define if you have the <fcntl.h> header file. */
537537
#undef HAVE_FCNTL_H
538538

539+
/* Define if you have the <gdbm/ndbm.h> header file. */
540+
#undef HAVE_GDBM_NDBM_H
541+
539542
/* Define if you have the <libutil.h> header file. */
540543
#undef HAVE_LIBUTIL_H
541544

@@ -548,6 +551,9 @@
548551
/* Define if you have the <ncurses.h> header file. */
549552
#undef HAVE_NCURSES_H
550553

554+
/* Define if you have the <ndbm.h> header file. */
555+
#undef HAVE_NDBM_H
556+
551557
/* Define if you have the <ndir.h> header file. */
552558
#undef HAVE_NDIR_H
553559

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22

3-
# From configure.in Revision: 1.155
3+
# From configure.in Revision: 1.156
44

55
# Guess values for system-dependent variables and create Makefiles.
66
# Generated automatically using autoconf version 2.14.1
@@ -1542,7 +1542,7 @@ for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
15421542
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
15431543
sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
15441544
sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
1545-
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
1545+
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h ndbm.h gdbm/ndbm.h
15461546
do
15471547
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15481548
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
371371
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
372372
sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
373373
sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
374-
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h)
374+
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h ndbm.h gdbm/ndbm.h)
375375
AC_HEADER_DIRENT
376376

377377
# checks for typedefs

0 commit comments

Comments
 (0)