--- /dev/null
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2001 Jarkko Hietaniemi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?MAKE:d_sresgproto: Hasproto i_unistd
+?MAKE: -pick add $@ %<
+?S:d_sresgproto:
+?S: This variable conditionally defines the HAS_SETRESGID_PROTO symbol,
+?S: which indicates to the C program that the system provides
+?S: a prototype for the setresgid() function. Otherwise, it is
+?S: up to the program to supply one.
+?S:.
+?C:HAS_SETRESGID_PROTO:
+?C: This symbol, if defined, indicates that the system provides
+?C: a prototype for the setresgid() function. Otherwise, it is up
+?C: to the program to supply one. Good guesses are
+?C: extern int setresgid(uid_t ruid, uid_t euid, uid_t suid);
+?C:.
+?H:#$d_sresgproto HAS_SETRESGID_PROTO /**/
+?H:.
+?LINT:set d_sresgproto
+: see if prototype for setresgid is available
+echo " "
+set d_sresgproto setresgid $i_unistd unistd.h
+eval $hasproto
+
--- /dev/null
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2001 Jarkko Hietaniemi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?MAKE:d_sresuproto: Hasproto i_unistd
+?MAKE: -pick add $@ %<
+?S:d_sresuproto:
+?S: This variable conditionally defines the HAS_SETRESUID_PROTO symbol,
+?S: which indicates to the C program that the system provides
+?S: a prototype for the setresuid() function. Otherwise, it is
+?S: up to the program to supply one.
+?S:.
+?C:HAS_SETRESUID_PROTO:
+?C: This symbol, if defined, indicates that the system provides
+?C: a prototype for the setresuid() function. Otherwise, it is up
+?C: to the program to supply one. Good guesses are
+?C: extern int setresuid(uid_t ruid, uid_t euid, uid_t suid);
+?C:.
+?H:#$d_sresuproto HAS_SETRESUID_PROTO /**/
+?H:.
+?LINT:set d_sresuproto
+: see if prototype for setresuid is available
+echo " "
+set d_sresuproto setresuid $i_unistd unistd.h
+eval $hasproto
+
?RCS: Revision 3.0.1.1 1994/08/29 16:21:50 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:i_db db_hashtype db_prefixtype: Inhdr +cc +ccflags rm contains cat \
- Compile d_const libs sed
+?MAKE:i_db db_hashtype db_prefixtype \
+ db_version_major db_version_minor db_version_patch : \
+ Inhdr +cc +ccflags rm contains cat \
+ Compile d_const libs sed
?MAKE: -pick add $@ %<
?S:i_db:
?S: This variable conditionally defines the I_DB symbol, and indicates
?S: in the <db.h> header file. In older versions of DB, it was
?S: int, while in newer ones it is size_t.
?S:.
+?S:db_version_major:
+?S: This variable contains the major version number of
+?S: Berkeley DB found in the <db.h> header file.
+?S:.
+?S:db_version_minor:
+?S: This variable contains the minor version number of
+?S: Berkeley DB found in the <db.h> header file.
+?S: For DB version 1 this is always 0.
+?S:.
+?S:db_version_patch:
+?S: This variable contains the patch version number of
+?S: Berkeley DB found in the <db.h> header file.
+?S: For DB version 1 this is always 0.
+?S:.
?C:I_DB:
?C: This symbol, if defined, indicates to the C program that it should
?C: include Berkeley's DB include file <db.h>.
?C: in the <db.h> header file. In older versions of DB, it was
?C: int, while in newer ones it is size_t.
?C:.
+?C:DB_VERSION_MAJOR_CFG:
+?C: This symbol, if defined, defines the major version number of
+?C: Berkeley DB found in the <db.h> header when Perl was configured.
+?C:.
+?C:DB_VERSION_MINOR_CFG:
+?C: This symbol, if defined, defines the minor version number of
+?C: Berkeley DB found in the <db.h> header when Perl was configured.
+?C: For DB version 1 this is always 0.
+?C:.
+?C:DB_VERSION_PATCH_CFG:
+?C: This symbol, if defined, defines the patch version number of
+?C: Berkeley DB found in the <db.h> header when Perl was configured.
+?C: For DB version 1 this is always 0.
+?C:.
?H:#$i_db I_DB /**/
?H:#define DB_Hash_t $db_hashtype /**/
?H:#define DB_Prefix_t $db_prefixtype /**/
+?H:#define DB_VERSION_MAJOR_CFG $db_version_major /**/
+?H:#define DB_VERSION_MINOR_CFG $db_version_minor /**/
+?H:#define DB_VERSION_PATCH_CFG $db_version_patch /**/
?H:.
+?F:!try
?LINT:set i_db
?LINT:change libs
: see if this is a db.h system
#include <sys/types.h>
#include <stdio.h>
#include <db.h>
-int main()
+int main(int argc, char *argv[])
{
#ifdef DB_VERSION_MAJOR /* DB version >= 2 */
int Major, Minor, Patch ;
unsigned long Version ;
(void)db_version(&Major, &Minor, &Patch) ;
- printf("You have Berkeley DB Version 2 or greater\n");
+ if (argc == 2) {
+ printf("%d %d %d %d %d %d\n",
+ DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+ Major, Minor, Patch);
+ exit(0);
+ }
+ printf("You have Berkeley DB Version 2 or greater.\n");
printf("db.h is from Berkeley DB Version %d.%d.%d\n",
DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
/* check that db.h & libdb are compatible */
if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
- printf("db.h and libdb are incompatible\n") ;
+ printf("db.h and libdb are incompatible.\n") ;
exit(3);
}
- printf("db.h and libdb are compatible\n") ;
+ printf("db.h and libdb are compatible.\n") ;
Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
+ DB_VERSION_PATCH ;
/* needs to be >= 2.3.4 */
if (Version < 2003004) {
/* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
- printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ;
+ printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
exit(2);
}
exit(0);
#else
#if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
- printf("You have Berkeley DB Version 1\n");
+ if (argc == 2) {
+ printf("1 0 0\n");
+ exit(0);
+ }
+ printf("You have Berkeley DB Version 1.\n");
exit(0); /* DB version < 2: the coast is clear. */
#else
exit(1); /* <db.h> not Berkeley DB? */
set try
if eval $compile_ok && ./try; then
echo 'Looks OK.' >&4
+ set `./try 1`
+ db_version_major=$1
+ db_version_minor=$2
+ db_version_patch=$3
else
echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
i_db=$undef