1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BDB 4.1.24

BitKeeper/deleted/.del-ex_access.wpj~3df6ae8c99bf7c5f:
  Delete: bdb/build_vxworks/ex_access/ex_access.wpj
BitKeeper/deleted/.del-ex_btrec.wpj~a7622f1c6f432dc6:
  Delete: bdb/build_vxworks/ex_btrec/ex_btrec.wpj
BitKeeper/deleted/.del-ex_dbclient.wpj~7345440f3b204cdd:
  Delete: bdb/build_vxworks/ex_dbclient/ex_dbclient.wpj
BitKeeper/deleted/.del-ex_env.wpj~fbe1ab10b04e8b74:
  Delete: bdb/build_vxworks/ex_env/ex_env.wpj
BitKeeper/deleted/.del-ex_mpool.wpj~4479cfd5c45f327d:
  Delete: bdb/build_vxworks/ex_mpool/ex_mpool.wpj
BitKeeper/deleted/.del-ex_tpcb.wpj~f78093006e14bf41:
  Delete: bdb/build_vxworks/ex_tpcb/ex_tpcb.wpj
BitKeeper/deleted/.del-db_buildall.dsp~bd749ff6da11682:
  Delete: bdb/build_win32/db_buildall.dsp
BitKeeper/deleted/.del-cxx_app.cpp~ad8df8e0791011ed:
  Delete: bdb/cxx/cxx_app.cpp
BitKeeper/deleted/.del-cxx_log.cpp~a50ff3118fe06952:
  Delete: bdb/cxx/cxx_log.cpp
BitKeeper/deleted/.del-cxx_table.cpp~ecd751e79b055556:
  Delete: bdb/cxx/cxx_table.cpp
BitKeeper/deleted/.del-namemap.txt~796a3acd3885d8fd:
  Delete: bdb/cxx/namemap.txt
BitKeeper/deleted/.del-Design.fileop~3ca4da68f1727373:
  Delete: bdb/db/Design.fileop
BitKeeper/deleted/.del-db185_int.h~61bee3736e7959ef:
  Delete: bdb/db185/db185_int.h
BitKeeper/deleted/.del-acconfig.h~411e8854d67ad8b5:
  Delete: bdb/dist/acconfig.h
BitKeeper/deleted/.del-mutex.m4~a13383cde18a64e1:
  Delete: bdb/dist/aclocal/mutex.m4
BitKeeper/deleted/.del-options.m4~b9d0ca637213750a:
  Delete: bdb/dist/aclocal/options.m4
BitKeeper/deleted/.del-programs.m4~3ce7890b47732b30:
  Delete: bdb/dist/aclocal/programs.m4
BitKeeper/deleted/.del-tcl.m4~f944e2db93c3b6db:
  Delete: bdb/dist/aclocal/tcl.m4
BitKeeper/deleted/.del-types.m4~59cae158c9a32cff:
  Delete: bdb/dist/aclocal/types.m4
BitKeeper/deleted/.del-script~d38f6d3a4f159cb4:
  Delete: bdb/dist/build/script
BitKeeper/deleted/.del-configure.in~ac795a92c8fe049c:
  Delete: bdb/dist/configure.in
BitKeeper/deleted/.del-ltconfig~66bbd007d8024af:
  Delete: bdb/dist/ltconfig
BitKeeper/deleted/.del-rec_ctemp~a28554362534f00a:
  Delete: bdb/dist/rec_ctemp
BitKeeper/deleted/.del-s_tcl~2ffe4326459fcd9f:
  Delete: bdb/dist/s_tcl
BitKeeper/deleted/.del-.IGNORE_ME~d8148b08fa7d5d15:
  Delete: bdb/dist/template/.IGNORE_ME
BitKeeper/deleted/.del-btree.h~179f2aefec1753d:
  Delete: bdb/include/btree.h
BitKeeper/deleted/.del-cxx_int.h~6b649c04766508f8:
  Delete: bdb/include/cxx_int.h
BitKeeper/deleted/.del-db.src~6b433ae615b16a8d:
  Delete: bdb/include/db.src
BitKeeper/deleted/.del-db_185.h~ad8b373d9391d35c:
  Delete: bdb/include/db_185.h
BitKeeper/deleted/.del-db_am.h~a714912b6b75932f:
  Delete: bdb/include/db_am.h
BitKeeper/deleted/.del-db_cxx.h~fcafadf45f5d19e9:
  Delete: bdb/include/db_cxx.h
BitKeeper/deleted/.del-db_dispatch.h~6844f20f7eb46904:
  Delete: bdb/include/db_dispatch.h
BitKeeper/deleted/.del-db_int.src~419a3f48b6a01da7:
  Delete: bdb/include/db_int.src
BitKeeper/deleted/.del-db_join.h~76f9747a42c3399a:
  Delete: bdb/include/db_join.h
BitKeeper/deleted/.del-db_page.h~e302ca3a4db3abdc:
  Delete: bdb/include/db_page.h
BitKeeper/deleted/.del-db_server_int.h~e1d20b6ba3bca1ab:
  Delete: bdb/include/db_server_int.h
BitKeeper/deleted/.del-db_shash.h~5fbf2d696fac90f3:
  Delete: bdb/include/db_shash.h
BitKeeper/deleted/.del-db_swap.h~1e60887550864a59:
  Delete: bdb/include/db_swap.h
BitKeeper/deleted/.del-db_upgrade.h~c644eee73701fc8d:
  Delete: bdb/include/db_upgrade.h
BitKeeper/deleted/.del-db_verify.h~b8d6c297c61f342e:
  Delete: bdb/include/db_verify.h
BitKeeper/deleted/.del-debug.h~dc2b4f2cf27ccebc:
  Delete: bdb/include/debug.h
BitKeeper/deleted/.del-hash.h~2aaa548b28882dfb:
  Delete: bdb/include/hash.h
BitKeeper/deleted/.del-lock.h~a761c1b7de57b77f:
  Delete: bdb/include/lock.h
BitKeeper/deleted/.del-log.h~ff20184238e35e4d:
  Delete: bdb/include/log.h
BitKeeper/deleted/.del-mp.h~7e317597622f3411:
  Delete: bdb/include/mp.h
BitKeeper/deleted/.del-mutex.h~d3ae7a2977a68137:
  Delete: bdb/include/mutex.h
BitKeeper/deleted/.del-os.h~91867cc8757cd0e3:
  Delete: bdb/include/os.h
BitKeeper/deleted/.del-os_jump.h~e1b939fa5151d4be:
  Delete: bdb/include/os_jump.h
BitKeeper/deleted/.del-qam.h~6fad0c1b5723d597:
  Delete: bdb/include/qam.h
BitKeeper/deleted/.del-queue.h~4c72c0826c123d5:
  Delete: bdb/include/queue.h
BitKeeper/deleted/.del-region.h~513fe04d977ca0fc:
  Delete: bdb/include/region.h
BitKeeper/deleted/.del-shqueue.h~525fc3e6c2025c36:
  Delete: bdb/include/shqueue.h
BitKeeper/deleted/.del-tcl_db.h~c536fd61a844f23f:
  Delete: bdb/include/tcl_db.h
BitKeeper/deleted/.del-txn.h~c8d94b221ec147e4:
  Delete: bdb/include/txn.h
BitKeeper/deleted/.del-xa.h~ecc466493aae9d9a:
  Delete: bdb/include/xa.h
BitKeeper/deleted/.del-DbRecoveryInit.java~756b52601a0b9023:
  Delete: bdb/java/src/com/sleepycat/db/DbRecoveryInit.java
BitKeeper/deleted/.del-DbTxnRecover.java~74607cba7ab89d6d:
  Delete: bdb/java/src/com/sleepycat/db/DbTxnRecover.java
BitKeeper/deleted/.del-lock_conflict.c~fc5e0f14cf597a2b:
  Delete: bdb/lock/lock_conflict.c
BitKeeper/deleted/.del-log.src~53ac9e7b5cb023f2:
  Delete: bdb/log/log.src
BitKeeper/deleted/.del-log_findckp.c~24287f008916e81f:
  Delete: bdb/log/log_findckp.c
BitKeeper/deleted/.del-log_rec.c~d51711f2cac09297:
  Delete: bdb/log/log_rec.c
BitKeeper/deleted/.del-log_register.c~b40bb4efac75ca15:
  Delete: bdb/log/log_register.c
BitKeeper/deleted/.del-Design~b3d0f179f2767b:
  Delete: bdb/mp/Design
BitKeeper/deleted/.del-os_finit.c~95dbefc6fe79b26c:
  Delete: bdb/os/os_finit.c
BitKeeper/deleted/.del-os_abs.c~df95d1e7db81924:
  Delete: bdb/os_vxworks/os_abs.c
BitKeeper/deleted/.del-os_finit.c~803b484bdb9d0122:
  Delete: bdb/os_vxworks/os_finit.c
BitKeeper/deleted/.del-os_map.c~3a6d7926398b76d3:
  Delete: bdb/os_vxworks/os_map.c
BitKeeper/deleted/.del-os_finit.c~19a227c6d3c78ad:
  Delete: bdb/os_win32/os_finit.c
BitKeeper/deleted/.del-log-corruption.patch~1cf2ecc7c6408d5d:
  Delete: bdb/patches/log-corruption.patch
BitKeeper/deleted/.del-Btree.pm~af6d0c5eaed4a98e:
  Delete: bdb/perl.BerkeleyDB/BerkeleyDB/Btree.pm
BitKeeper/deleted/.del-BerkeleyDB.pm~7244036d4482643:
  Delete: bdb/perl.BerkeleyDB/BerkeleyDB.pm
BitKeeper/deleted/.del-BerkeleyDB.pod~e7b18fd6132448e3:
  Delete: bdb/perl.BerkeleyDB/BerkeleyDB.pod
BitKeeper/deleted/.del-Hash.pm~10292a26c06a5c95:
  Delete: bdb/perl.BerkeleyDB/BerkeleyDB/Hash.pm
BitKeeper/deleted/.del-BerkeleyDB.pod.P~79f76a1495eda203:
  Delete: bdb/perl.BerkeleyDB/BerkeleyDB.pod.P
BitKeeper/deleted/.del-BerkeleyDB.xs~80c99afbd98e392c:
  Delete: bdb/perl.BerkeleyDB/BerkeleyDB.xs
BitKeeper/deleted/.del-Changes~729c1891efa60de9:
  Delete: bdb/perl.BerkeleyDB/Changes
BitKeeper/deleted/.del-MANIFEST~63a1e34aecf157a0:
  Delete: bdb/perl.BerkeleyDB/MANIFEST
BitKeeper/deleted/.del-Makefile.PL~c68797707d8df87a:
  Delete: bdb/perl.BerkeleyDB/Makefile.PL
BitKeeper/deleted/.del-README~5f2f579b1a241407:
  Delete: bdb/perl.BerkeleyDB/README
BitKeeper/deleted/.del-Todo~dca3c66c193adda9:
  Delete: bdb/perl.BerkeleyDB/Todo
BitKeeper/deleted/.del-config.in~ae81681e450e0999:
  Delete: bdb/perl.BerkeleyDB/config.in
BitKeeper/deleted/.del-dbinfo~28ad67d83be4f68e:
  Delete: bdb/perl.BerkeleyDB/dbinfo
BitKeeper/deleted/.del-mkconsts~543ab60669c7a04e:
  Delete: bdb/perl.BerkeleyDB/mkconsts
BitKeeper/deleted/.del-mkpod~182c0ca54e439afb:
  Delete: bdb/perl.BerkeleyDB/mkpod
BitKeeper/deleted/.del-5.004~e008cb5a48805543:
  Delete: bdb/perl.BerkeleyDB/patches/5.004
BitKeeper/deleted/.del-irix_6_5.pl~61662bb08afcdec8:
  Delete: bdb/perl.BerkeleyDB/hints/irix_6_5.pl
BitKeeper/deleted/.del-solaris.pl~6771e7182394e152:
  Delete: bdb/perl.BerkeleyDB/hints/solaris.pl
BitKeeper/deleted/.del-typemap~783b8f5295b05f3d:
  Delete: bdb/perl.BerkeleyDB/typemap
BitKeeper/deleted/.del-5.004_01~6081ce2fff7b0bc:
  Delete: bdb/perl.BerkeleyDB/patches/5.004_01
BitKeeper/deleted/.del-5.004_02~87214eac35ad9e6:
  Delete: bdb/perl.BerkeleyDB/patches/5.004_02
BitKeeper/deleted/.del-5.004_03~9a672becec7cb40f:
  Delete: bdb/perl.BerkeleyDB/patches/5.004_03
BitKeeper/deleted/.del-5.004_04~e326cb51af09d154:
  Delete: bdb/perl.BerkeleyDB/patches/5.004_04
BitKeeper/deleted/.del-5.004_05~7ab457a1e41a92fe:
  Delete: bdb/perl.BerkeleyDB/patches/5.004_05
BitKeeper/deleted/.del-5.005~f9e2d59b5964cd4b:
  Delete: bdb/perl.BerkeleyDB/patches/5.005
BitKeeper/deleted/.del-5.005_01~3eb9fb7b5842ea8e:
  Delete: bdb/perl.BerkeleyDB/patches/5.005_01
BitKeeper/deleted/.del-5.005_02~67477ce0bef717cb:
  Delete: bdb/perl.BerkeleyDB/patches/5.005_02
BitKeeper/deleted/.del-5.005_03~c4c29a1fb21e290a:
  Delete: bdb/perl.BerkeleyDB/patches/5.005_03
BitKeeper/deleted/.del-5.6.0~e1fb9897d124ee22:
  Delete: bdb/perl.BerkeleyDB/patches/5.6.0
BitKeeper/deleted/.del-btree.t~e4a1a3c675ddc406:
  Delete: bdb/perl.BerkeleyDB/t/btree.t
BitKeeper/deleted/.del-db-3.0.t~d2c60991d84558f2:
  Delete: bdb/perl.BerkeleyDB/t/db-3.0.t
BitKeeper/deleted/.del-db-3.1.t~6ee88cd13f55e018:
  Delete: bdb/perl.BerkeleyDB/t/db-3.1.t
BitKeeper/deleted/.del-db-3.2.t~f73b6461f98fd1cf:
  Delete: bdb/perl.BerkeleyDB/t/db-3.2.t
BitKeeper/deleted/.del-destroy.t~cc6a2ae1980a2ecd:
  Delete: bdb/perl.BerkeleyDB/t/destroy.t
BitKeeper/deleted/.del-env.t~a8604a4499c4bd07:
  Delete: bdb/perl.BerkeleyDB/t/env.t
BitKeeper/deleted/.del-examples.t~2571b77c3cc75574:
  Delete: bdb/perl.BerkeleyDB/t/examples.t
BitKeeper/deleted/.del-examples.t.T~8228bdd75ac78b88:
  Delete: bdb/perl.BerkeleyDB/t/examples.t.T
BitKeeper/deleted/.del-examples3.t.T~66a186897a87026d:
  Delete: bdb/perl.BerkeleyDB/t/examples3.t.T
BitKeeper/deleted/.del-examples3.t~fe3822ba2f2d7f83:
  Delete: bdb/perl.BerkeleyDB/t/examples3.t
BitKeeper/deleted/.del-filter.t~f87b045c1b708637:
  Delete: bdb/perl.BerkeleyDB/t/filter.t
BitKeeper/deleted/.del-hash.t~616bfb4d644de3a3:
  Delete: bdb/perl.BerkeleyDB/t/hash.t
BitKeeper/deleted/.del-join.t~29fc39f74a83ca22:
  Delete: bdb/perl.BerkeleyDB/t/join.t
BitKeeper/deleted/.del-mldbm.t~31f5015341eea040:
  Delete: bdb/perl.BerkeleyDB/t/mldbm.t
BitKeeper/deleted/.del-queue.t~8f338034ce44a641:
  Delete: bdb/perl.BerkeleyDB/t/queue.t
BitKeeper/deleted/.del-recno.t~d4ddbd3743add63e:
  Delete: bdb/perl.BerkeleyDB/t/recno.t
BitKeeper/deleted/.del-strict.t~6885cdd2ea71ca2d:
  Delete: bdb/perl.BerkeleyDB/t/strict.t
BitKeeper/deleted/.del-subdb.t~aab62a5d5864c603:
  Delete: bdb/perl.BerkeleyDB/t/subdb.t
BitKeeper/deleted/.del-txn.t~65033b8558ae1216:
  Delete: bdb/perl.BerkeleyDB/t/txn.t
BitKeeper/deleted/.del-unknown.t~f3710458682665e1:
  Delete: bdb/perl.BerkeleyDB/t/unknown.t
BitKeeper/deleted/.del-Changes~436f74a5c414c65b:
  Delete: bdb/perl.DB_File/Changes
BitKeeper/deleted/.del-DB_File.pm~ae0951c6c7665a82:
  Delete: bdb/perl.DB_File/DB_File.pm
BitKeeper/deleted/.del-DB_File.xs~89e49a0b5556f1d8:
  Delete: bdb/perl.DB_File/DB_File.xs
BitKeeper/deleted/.del-DB_File_BS~290fad5dbbb87069:
  Delete: bdb/perl.DB_File/DB_File_BS
BitKeeper/deleted/.del-MANIFEST~90ee581572bdd4ac:
  Delete: bdb/perl.DB_File/MANIFEST
BitKeeper/deleted/.del-Makefile.PL~ac0567bb5a377e38:
  Delete: bdb/perl.DB_File/Makefile.PL
BitKeeper/deleted/.del-README~77e924a5a9bae6b3:
  Delete: bdb/perl.DB_File/README
BitKeeper/deleted/.del-config.in~ab4c2792b86a810b:
  Delete: bdb/perl.DB_File/config.in
BitKeeper/deleted/.del-dbinfo~461c43b30fab2cb:
  Delete: bdb/perl.DB_File/dbinfo
BitKeeper/deleted/.del-dynixptx.pl~50dcddfae25d17e9:
  Delete: bdb/perl.DB_File/hints/dynixptx.pl
BitKeeper/deleted/.del-typemap~55cffb3288a9e587:
  Delete: bdb/perl.DB_File/typemap
BitKeeper/deleted/.del-version.c~a4df0e646f8b3975:
  Delete: bdb/perl.DB_File/version.c
BitKeeper/deleted/.del-5.004_01~d6830d0082702af7:
  Delete: bdb/perl.DB_File/patches/5.004_01
BitKeeper/deleted/.del-5.004_02~78b082dc80c91031:
  Delete: bdb/perl.DB_File/patches/5.004_02
BitKeeper/deleted/.del-5.004~4411ec2e3c9e008b:
  Delete: bdb/perl.DB_File/patches/5.004
BitKeeper/deleted/.del-sco.pl~1e795fe14fe4dcfe:
  Delete: bdb/perl.DB_File/hints/sco.pl
BitKeeper/deleted/.del-5.004_03~33f274648b160d95:
  Delete: bdb/perl.DB_File/patches/5.004_03
BitKeeper/deleted/.del-5.004_04~8f3d1b3cf18bb20a:
  Delete: bdb/perl.DB_File/patches/5.004_04
BitKeeper/deleted/.del-5.004_05~9c0f02e7331e142:
  Delete: bdb/perl.DB_File/patches/5.004_05
BitKeeper/deleted/.del-5.005~c2108cb2e3c8d951:
  Delete: bdb/perl.DB_File/patches/5.005
BitKeeper/deleted/.del-5.005_01~3b45e9673afc4cfa:
  Delete: bdb/perl.DB_File/patches/5.005_01
BitKeeper/deleted/.del-5.005_02~9fe5766bb02a4522:
  Delete: bdb/perl.DB_File/patches/5.005_02
BitKeeper/deleted/.del-5.005_03~ffa1c38c19ae72ea:
  Delete: bdb/perl.DB_File/patches/5.005_03
BitKeeper/deleted/.del-5.6.0~373be3a5ce47be85:
  Delete: bdb/perl.DB_File/patches/5.6.0
BitKeeper/deleted/.del-db-btree.t~3231595a1c241eb3:
  Delete: bdb/perl.DB_File/t/db-btree.t
BitKeeper/deleted/.del-db-hash.t~7c4ad0c795c7fad2:
  Delete: bdb/perl.DB_File/t/db-hash.t
BitKeeper/deleted/.del-db-recno.t~6c2d3d80b9ba4a50:
  Delete: bdb/perl.DB_File/t/db-recno.t
BitKeeper/deleted/.del-db_server.sed~cdb00ebcd48a64e2:
  Delete: bdb/rpc_server/db_server.sed
BitKeeper/deleted/.del-db_server_proc.c~d46c8f409c3747f4:
  Delete: bdb/rpc_server/db_server_proc.c
BitKeeper/deleted/.del-db_server_svc.sed~3f5e59f334fa4607:
  Delete: bdb/rpc_server/db_server_svc.sed
BitKeeper/deleted/.del-db_server_util.c~a809f3a4629acda:
  Delete: bdb/rpc_server/db_server_util.c
BitKeeper/deleted/.del-log.tcl~ff1b41f1355b97d7:
  Delete: bdb/test/log.tcl
BitKeeper/deleted/.del-mpool.tcl~b0df4dc1b04db26c:
  Delete: bdb/test/mpool.tcl
BitKeeper/deleted/.del-mutex.tcl~52fd5c73a150565:
  Delete: bdb/test/mutex.tcl
BitKeeper/deleted/.del-txn.tcl~c4ff071550b5446e:
  Delete: bdb/test/txn.tcl
BitKeeper/deleted/.del-README~e800a12a5392010a:
  Delete: bdb/test/upgrade/README
BitKeeper/deleted/.del-pack-2.6.6.pl~89d5076d758d3e98:
  Delete: bdb/test/upgrade/generate-2.X/pack-2.6.6.pl
BitKeeper/deleted/.del-test-2.6.patch~4a52dc83d447547b:
  Delete: bdb/test/upgrade/generate-2.X/test-2.6.patch
This commit is contained in:
unknown
2002-10-30 15:57:05 +04:00
parent b8798d25ab
commit 155e78f014
1191 changed files with 171164 additions and 58171 deletions

434
bdb/perl/DB_File/Changes Normal file
View File

@ -0,0 +1,434 @@
1.805 1st September 2002
* Added support to allow DB_File to build with Berkeley DB 4.1.X
* Tightened up the test harness to test that calls to untie don't generate
the "untie attempted while %d inner references still exist" warning.
* added code to guard against calling the callbacks (compare,hash & prefix)
recursively.
* pasing undef for the flags and/or mode when opening a database could cause
a "Use of uninitialized value in subroutine entry" warning. Now silenced.
* DBM filter code beefed up to cope with read-only $_.
1.804 2nd June 2002
* Perl core patch 14939 added a new warning to "splice". This broke the
db-recno test harness. Fixed.
* merged core patches 16502 & 16540.
1.803 1st March 2002
* Fixed a problem with db-btree.t where it complained about an "our"
variable redeclaation.
* FETCH, STORE & DELETE don't map the flags parameter into the
equivalent Berkeley DB function anymore.
1.802 6th January 2002
* The message about some test failing in db-recno.t had the wrong test
numbers. Fixed.
* merged core patch 13942.
1.801 26th November 2001
* Fixed typo in Makefile.PL
* Added "clean" attribute to Makefile.PL
1.800 23rd November 2001
* use pport.h for perl backward compatability code.
* use new ExtUtils::Constant module to generate XS constants.
* upgrade Makefile.PL upgrade/downgrade code to toggle "our" with
"use vars"
1.79 22nd October 2001
* Added a "local $SIG{__DIE__}" inside the eval that checks for
the presence of XSLoader s suggested by Andrew Hryckowin.
* merged core patch 12277.
* Changed NEXTKEY to not initialise the input key. It isn't used anyway.
1.79 22nd October 2001
* Fixed test harness for cygwin
1.78 30th July 2001
* the test in Makefile.PL for AIX used -plthreads. Should have been
-lpthreads
* merged Core patches
10372, 10335, 10372, 10534, 10549, 10643, 11051, 11194, 11432
* added documentation patch regarding duplicate keys from Andrew Johnson
1.77 26th April 2001
* AIX is reported to need -lpthreads, so Makefile.PL now checks for
AIX and adds it to the link options.
* Minor documentation updates.
* Merged Core patch 9176
* Added a patch from Edward Avis that adds support for splice with
recno databases.
* Modified Makefile.PL to only enable the warnings pragma if using perl
5.6.1 or better.
1.76 15th January 2001
* Added instructions for using LD_PRELOAD to get Berkeley DB 2.x to work
with DB_File on Linux. Thanks to Norbert Bollow for sending details of
this approach.
1.75 17th December 2000
* Fixed perl core patch 7703
* Added suppport to allow DB_File to be built with Berkeley DB 3.2 --
btree_compare, btree_prefix and hash_cb needed to be changed.
* Updated dbinfo to support Berkeley DB 3.2 file format changes.
1.74 10th December 2000
* A "close" call in DB_File.xs needed parenthesised to stop win32 from
thinking it was one of its macros.
* Updated dbinfo to support Berkeley DB 3.1 file format changes.
* DB_File.pm & the test hasness now use the warnings pragma (when
available).
* Included Perl core patch 7703 -- size argument for hash_cb is different
for Berkeley DB 3.x
* Included Perl core patch 7801 -- Give __getBerkeleyDBInfo the ANSI C
treatment.
* @a = () produced the warning 'Argument "" isn't numeric in entersub'
This has been fixed. Thanks to Edward Avis for spotting this bug.
* Added note about building under Linux. Included patches.
* Included Perl core patch 8068 -- fix for bug 20001013.009
When run with warnings enabled "$hash{XX} = undef " produced an
"Uninitialized value" warning. This has been fixed.
1.73 31st May 2000
* Added support in version.c for building with threaded Perl.
* Berkeley DB 3.1 has reenabled support for null keys. The test
harness has been updated to reflect this.
1.72 16th January 2000
* Added hints/sco.pl
* The module will now use XSLoader when it is available. When it
isn't it will use DynaLoader.
* The locking section in DB_File.pm has been discredited. Many thanks
to David Harris for spotting the underlying problem, contributing
the updates to the documentation and writing DB_File::Lock (available
on CPAN).
1.71 7th September 1999
* Fixed a bug that prevented 1.70 from compiling under win32
* Updated to support Berkeley DB 3.x
* Updated dbinfo for Berkeley DB 3.x file formats.
1.70 4th August 1999
* Initialise $DB_File::db_ver and $DB_File::db_version with
GV_ADD|GV_ADDMULT -- bug spotted by Nick Ing-Simmons.
* Added a BOOT check to test for equivalent versions of db.h &
libdb.a/so.
1.69 3rd August 1999
* fixed a bug in push -- DB_APPEND wasn't working properly.
* Fixed the R_SETCURSOR bug introduced in 1.68
* Added a new Perl variable $DB_File::db_ver
1.68 22nd July 1999
* Merged changes from 5.005_58
* Fixed a bug in R_IBEFORE & R_IAFTER procesing in Berkeley DB
2 databases.
* Added some of the examples in the POD into the test harness.
1.67 6th June 1999
* Added DBM Filter documentation to DB_File.pm
* Fixed DBM Filter code to work with 5.004
* A few instances of newSVpvn were used in 1.66. This isn't available in
Perl 5.004_04 or earlier. Replaced with newSVpv.
1.66 15th March 1999
* Added DBM Filter code
1.65 6th March 1999
* Fixed a bug in the recno PUSH logic.
* The BOOT version check now needs 2.3.4 when using Berkeley DB version 2
1.64 21st February 1999
* Tidied the 1.x to 2.x flag mapping code.
* Added a patch from Mark Kettenis <kettenis@wins.uva.nl> to fix a flag
mapping problem with O_RDONLY on the Hurd
* Updated the message that db-recno.t prints when tests 51, 53 or 55 fail.
1.63 19th December 1998
* Fix to allow DB 2.6.x to build with DB_File
* Documentation updated to use push,pop etc in the RECNO example &
to include the find_dup & del_dup methods.
1.62 30th November 1998
Added hints/dynixptx.pl.
Fixed typemap -- 1.61 used PL_na instead of na
1.61 19th November 1998
Added a note to README about how to build Berkeley DB 2.x when
using HP-UX.
Minor modifications to get the module to build with DB 2.5.x
Fixed a typo in the definition of O_RDONLY, courtesy of Mark Kettenis.
1.60
Changed the test to check for full tied array support
1.59
Updated the license section.
Berkeley DB 2.4.10 disallows zero length keys. Tests 32 & 42 in
db-btree.t and test 27 in db-hash.t failed because of this change.
Those tests have been zapped.
Added dbinfo to the distribution.
1.58
Tied Array support was enhanced in Perl 5.004_57. DB_File now
supports PUSH,POP,SHIFT,UNSHIFT & STORESIZE.
Fixed a problem with the use of sv_setpvn. When the size is
specified as 0, it does a strlen on the data. This was ok for DB
1.x, but isn't for DB 2.x.
1.57
If Perl has been compiled with Threads support,the symbol op will be
defined. This clashes with a field name in db.h, so it needs to be
#undef'ed before db.h is included.
1.56
Documented the Solaris 2.5 mutex bug
1.55
Merged 1.16 changes.
1.54
Fixed a small bug in the test harness when run under win32
The emulation of fd when useing DB 2.x was busted.
1.53
Added DB_RENUMBER to flags for recno.
1.52
Patch from Nick Ing-Simmons now allows DB_File to build on NT.
Merged 1.15 patch.
1.51
Fixed the test harness so that it doesn't expect DB_File to have
been installed by the main Perl build.
Fixed a bug in mapping 1.x O_RDONLY flag to 2.x DB_RDONLY equivalent
1.50
DB_File can now build with either DB 1.x or 2.x, but not both at
the same time.
1.16
A harmless looking tab was causing Makefile.PL to fail on AIX 3.2.5
Small fix for the AIX strict C compiler XLC which doesn't like
__attribute__ being defined via proto.h and redefined via db.h. Fix
courtesy of Jarkko Hietaniemi.
1.15
Patch from Gisle Aas <gisle@aas.no> to suppress "use of undefined
value" warning with db_get and db_seq.
Patch from Gisle Aas <gisle@aas.no> to make DB_File export only the
O_* constants from Fcntl.
Removed the DESTROY method from the DB_File::HASHINFO module.
Previously DB_File hard-wired the class name of any object that it
created to "DB_File". This makes sub-classing difficult. Now
DB_File creats objects in the namespace of the package it has been
inherited into.
1.14
Made it illegal to tie an associative array to a RECNO database and
an ordinary array to a HASH or BTREE database.
1.13
Minor changes to DB_FIle.xs and DB_File.pm
1.12
Documented the incompatibility with version 2 of Berkeley DB.
1.11
Documented the untie gotcha.
1.10
Fixed fd method so that it still returns -1 for in-memory files
when db 1.86 is used.
1.09
Minor bug fix in DB_File::HASHINFO, DB_File::RECNOINFO and
DB_File::BTREEINFO.
Changed default mode to 0666.
1.08
Documented operation of bval.
1.07
Fixed bug with RECNO, where bval wasn't defaulting to "\n".
1.06
Minor namespace cleanup: Localized PrintBtree.
1.05
Made all scripts in the documentation strict and -w clean.
Added logic to DB_File.xs to allow the module to be built after
Perl is installed.
1.04
Minor documentation changes.
Fixed a bug in hash_cb. Patches supplied by Dave Hammen,
<hammen@gothamcity.jsc.nasa.govt>.
Fixed a bug with the constructors for DB_File::HASHINFO,
DB_File::BTREEINFO and DB_File::RECNOINFO. Also tidied up the
constructors to make them -w clean.
Reworked part of the test harness to be more locale friendly.
1.03
Documentation update.
DB_File now imports the constants (O_RDWR, O_CREAT etc.) from Fcntl
automatically.
The standard hash function exists is now supported.
Modified the behavior of get_dup. When it returns an associative
array, the value is the count of the number of matching BTREE
values.
1.02
Merged OS/2 specific code into DB_File.xs
Removed some redundant code in DB_File.xs.
Documentation update.
Allow negative subscripts with RECNO interface.
Changed the default flags from O_RDWR to O_CREAT|O_RDWR.
The example code which showed how to lock a database needed a call
to sync added. Without it the resultant database file was empty.
Added get_dup method.
1.01
Fixed a core dump problem with SunOS.
The return value from TIEHASH wasn't set to NULL when dbopen
returned an error.
1.0
DB_File has been in use for over a year. To reflect that, the
version number has been incremented to 1.0.
Added complete support for multiple concurrent callbacks.
Using the push method on an empty list didn't work properly. This
has been fixed.
0.3
Added prototype support for multiple btree compare callbacks.
0.2
When DB_File is opening a database file it no longer terminates the
process if dbopen returned an error. This allows file protection
errors to be caught at run time. Thanks to Judith Grass
<grass@cybercash.com> for spotting the bug.
0.1
First Release.

2291
bdb/perl/DB_File/DB_File.pm Normal file

File diff suppressed because it is too large Load Diff

1951
bdb/perl/DB_File/DB_File.xs Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
# NeXT needs /usr/lib/libposix.a to load along with DB_File.so
if ( $dlsrc eq "dl_next.xs" ) {
@DynaLoader::dl_resolve_using = ( '/usr/lib/libposix.a' );
}
1;

30
bdb/perl/DB_File/MANIFEST Normal file
View File

@ -0,0 +1,30 @@
Changes
DB_File.pm
DB_File.xs
DB_File_BS
MANIFEST
Makefile.PL
README
config.in
dbinfo
fallback.h
fallback.xs
hints/dynixptx.pl
hints/sco.pl
patches/5.004
patches/5.004_01
patches/5.004_02
patches/5.004_03
patches/5.004_04
patches/5.004_05
patches/5.005
patches/5.005_01
patches/5.005_02
patches/5.005_03
patches/5.6.0
ppport.h
t/db-btree.t
t/db-hash.t
t/db-recno.t
typemap
version.c

View File

@ -0,0 +1,330 @@
#! perl -w
use strict ;
use ExtUtils::MakeMaker 5.16 ;
use Config ;
die "DB_File needs Perl 5.004_05 or better. This is $]\n"
if $] <= 5.00404;
my $VER_INFO ;
my $LIB_DIR ;
my $INC_DIR ;
my $DB_NAME ;
my $LIBS ;
my $COMPAT185 = "" ;
ParseCONFIG() ;
my @files = ('DB_File.pm', glob "t/*.t") ;
UpDowngrade(@files);
if (defined $DB_NAME)
{ $LIBS = $DB_NAME }
else {
if ($^O eq 'MSWin32')
{ $LIBS = '-llibdb' }
else
{ $LIBS = '-ldb' }
}
# Solaris is special.
#$LIBS .= " -lthread" if $^O eq 'solaris' ;
# AIX is special.
$LIBS .= " -lpthread" if $^O eq 'aix' ;
# OS2 is a special case, so check for it now.
my $OS2 = "" ;
$OS2 = "-DOS2" if $Config{'osname'} eq 'os2' ;
WriteMakefile(
NAME => 'DB_File',
LIBS => ["-L${LIB_DIR} $LIBS"],
#MAN3PODS => {}, # Pods will be built by installman.
INC => "-I$INC_DIR",
VERSION_FROM => 'DB_File.pm',
XSPROTOARG => '-noprototypes',
DEFINE => "-D_NOT_CORE $OS2 $VER_INFO $COMPAT185",
OBJECT => 'version$(OBJ_EXT) DB_File$(OBJ_EXT)',
#OPTIMIZE => '-g',
'depend' => { 'Makefile' => 'config.in',
'version$(OBJ_EXT)' => 'version.c'},
'clean' => { FILES => 'constants.h constants.xs' },
'macro' => { INSTALLDIRS => 'perl', my_files => "@files" },
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz',
DIST_DEFAULT => 'MyDoubleCheck tardist'},
);
my @names = qw(
BTREEMAGIC
BTREEVERSION
DB_LOCK
DB_SHMEM
DB_TXN
HASHMAGIC
HASHVERSION
MAX_PAGE_NUMBER
MAX_PAGE_OFFSET
MAX_REC_NUMBER
RET_ERROR
RET_SPECIAL
RET_SUCCESS
R_CURSOR
R_DUP
R_FIRST
R_FIXEDLEN
R_IAFTER
R_IBEFORE
R_LAST
R_NEXT
R_NOKEY
R_NOOVERWRITE
R_PREV
R_RECNOSYNC
R_SETCURSOR
R_SNAPSHOT
__R_UNUSED
);
if (eval {require ExtUtils::Constant; 1}) {
# Check the constants above all appear in @EXPORT in DB_File.pm
my %names = map { $_, 1} @names;
open F, "<DB_File.pm" or die "Cannot open DB_File.pm: $!\n";
while (<F>)
{
last if /^\s*\@EXPORT\s+=\s+qw\(/ ;
}
while (<F>)
{
last if /^\s*\)/ ;
/(\S+)/ ;
delete $names{$1} if defined $1 ;
}
close F ;
if ( keys %names )
{
my $missing = join ("\n\t", sort keys %names) ;
die "The following names are missing from \@EXPORT in DB_File.pm\n" .
"\t$missing\n" ;
}
ExtUtils::Constant::WriteConstants(
NAME => 'DB_File',
NAMES => \@names,
C_FILE => 'constants.h',
XS_FILE => 'constants.xs',
);
}
else {
use File::Copy;
copy ('fallback.h', 'constants.h')
or die "Can't copy fallback.h to constants.h: $!";
copy ('fallback.xs', 'constants.xs')
or die "Can't copy fallback.xs to constants.xs: $!";
}
exit;
sub MY::postamble { <<'EOM' } ;
MyDoubleCheck:
@echo Checking config.in is setup for a release
@(grep "^LIB.*/usr/local/BerkeleyDB" config.in && \
grep "^INCLUDE.*/usr/local/BerkeleyDB" config.in && \
grep "^#DBNAME.*" config.in) >/dev/null || \
(echo config.in needs fixing ; exit 1)
@echo config.in is ok
@echo
@echo Checking DB_File.xs is ok for a release.
@(perl -ne ' exit 1 if /^\s*#\s*define\s+TRACE/ ; ' DB_File.xs || \
(echo DB_File.xs needs fixing ; exit 1))
@echo DB_File.xs is ok
@echo
@echo Checking for $$^W in files: $(my_files)
@perl -ne ' \
exit 1 if /^\s*local\s*\(\s*\$$\^W\s*\)/;' $(my_files) || \
(echo found unexpected $$^W ; exit 1)
@echo No $$^W found.
@echo
@echo Checking for 'use vars' in files: $(my_files)
@perl -ne ' \
exit 0 if /^__(DATA|END)__/; \
exit 1 if /^\s*use\s+vars/;' $(my_files) || \
(echo found unexpected "use vars"; exit 1)
@echo No 'use vars' found.
@echo
@echo All files are OK for a release.
@echo
EOM
sub ParseCONFIG
{
my ($k, $v) ;
my @badkey = () ;
my %Info = () ;
my @Options = qw( INCLUDE LIB PREFIX HASH DBNAME COMPAT185 ) ;
my %ValidOption = map {$_, 1} @Options ;
my %Parsed = %ValidOption ;
my $CONFIG = 'config.in' ;
print "Parsing $CONFIG...\n" ;
# DBNAME & COMPAT185 are optional, so pretend they have
# been parsed.
delete $Parsed{'DBNAME'} ;
delete $Parsed{'COMPAT185'} ;
$Info{COMPAT185} = "No" ;
open(F, "$CONFIG") or die "Cannot open file $CONFIG: $!\n" ;
while (<F>) {
s/^\s*|\s*$//g ;
next if /^\s*$/ or /^\s*#/ ;
s/\s*#\s*$// ;
($k, $v) = split(/\s+=\s+/, $_, 2) ;
$k = uc $k ;
if ($ValidOption{$k}) {
delete $Parsed{$k} ;
$Info{$k} = $v ;
}
else {
push(@badkey, $k) ;
}
}
close F ;
print "Unknown keys in $CONFIG ignored [@badkey]\n"
if @badkey ;
# check parsed values
my @missing = () ;
die "The following keys are missing from $CONFIG file: [@missing]\n"
if @missing = keys %Parsed ;
$INC_DIR = $ENV{'DB_FILE_INCLUDE'} || $Info{'INCLUDE'} ;
$LIB_DIR = $ENV{'DB_FILE_LIB'} || $Info{'LIB'} ;
$DB_NAME = $Info{'DBNAME'} if defined $Info{'DBNAME'} ;
$COMPAT185 = "-DCOMPAT185 -DDB_LIBRARY_COMPATIBILITY_API"
if (defined $ENV{'DB_FILE_COMPAT185'} &&
$ENV{'DB_FILE_COMPAT185'} =~ /^\s*(on|true|1)\s*$/i) ||
$Info{'COMPAT185'} =~ /^\s*(on|true|1)\s*$/i ;
my $PREFIX = $Info{'PREFIX'} ;
my $HASH = $Info{'HASH'} ;
$VER_INFO = "-DmDB_Prefix_t=${PREFIX} -DmDB_Hash_t=${HASH}" ;
print <<EOM if 0 ;
INCLUDE [$INC_DIR]
LIB [$LIB_DIR]
HASH [$HASH]
PREFIX [$PREFIX]
DBNAME [$DB_NAME]
EOM
print "Looks Good.\n" ;
}
sub UpDowngrade
{
my @files = @_ ;
# our is stable from 5.6.0 onward
# warnings is stable from 5.6.1 onward
# Note: this code assumes that each statement it modifies is not
# split across multiple lines.
my $warn_sub ;
my $our_sub ;
if ($] < 5.006001) {
# From: use|no warnings "blah"
# To: local ($^W) = 1; # use|no warnings "blah"
#
# and
#
# From: warnings::warnif(x,y);
# To: $^W && carp(y); # warnif -- x
$warn_sub = sub {
s/^(\s*)(no\s+warnings)/${1}local (\$^W) = 0; #$2/ ;
s/^(\s*)(use\s+warnings)/${1}local (\$^W) = 1; #$2/ ;
s/^(\s*)warnings::warnif\s*\((.*?)\s*,\s*(.*?)\)\s*;/${1}\$^W && carp($3); # warnif - $2/ ;
};
}
else {
# From: local ($^W) = 1; # use|no warnings "blah"
# To: use|no warnings "blah"
#
# and
#
# From: $^W && carp(y); # warnif -- x
# To: warnings::warnif(x,y);
$warn_sub = sub {
s/^(\s*)local\s*\(\$\^W\)\s*=\s*\d+\s*;\s*#\s*((no|use)\s+warnings.*)/$1$2/ ;
s/^(\s*)\$\^W\s+\&\&\s*carp\s*\((.*?)\)\s*;\s*#\s*warnif\s*-\s*(.*)/${1}warnings::warnif($3, $2);/ ;
};
}
if ($] < 5.006000) {
$our_sub = sub {
if ( /^(\s*)our\s+\(\s*([^)]+\s*)\)/ ) {
my $indent = $1;
my $vars = join ' ', split /\s*,\s*/, $2;
$_ = "${indent}use vars qw($vars);\n";
}
};
}
else {
$our_sub = sub {
if ( /^(\s*)use\s+vars\s+qw\((.*?)\)/ ) {
my $indent = $1;
my $vars = join ', ', split ' ', $2;
$_ = "${indent}our ($vars);\n";
}
};
}
foreach (@files)
{ doUpDown($our_sub, $warn_sub, $_) }
}
sub doUpDown
{
my $our_sub = shift;
my $warn_sub = shift;
local ($^I) = ".bak" ;
local (@ARGV) = shift;
while (<>)
{
print, last if /^__(END|DATA)__/ ;
&{ $our_sub }();
&{ $warn_sub }();
print ;
}
return if eof ;
while (<>)
{ print }
}
# end of file Makefile.PL

458
bdb/perl/DB_File/README Normal file
View File

@ -0,0 +1,458 @@
DB_File
Version 1.805
1st Sep 2002
Copyright (c) 1995-2002 Paul Marquess. All rights reserved. This
program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
IMPORTANT NOTICE
================
If are using the locking technique described in older versions of
DB_File, please read the section called "Locking: The Trouble with fd"
in DB_File.pm immediately. The locking method has been found to be
unsafe. You risk corrupting your data if you continue to use it.
DESCRIPTION
-----------
DB_File is a module which allows Perl programs to make use of the
facilities provided by Berkeley DB version 1. (DB_File can be built
version 2, 3 or 4 of Berkeley DB, but it will only support the 1.x
features),
If you want to make use of the new features available in Berkeley DB
2.x, 3.x or 4.x, use the Perl module BerkeleyDB instead.
Berkeley DB is a C library which provides a consistent interface to a
number of database formats. DB_File provides an interface to all three
of the database types (hash, btree and recno) currently supported by
Berkeley DB.
For further details see the documentation included at the end of the
file DB_File.pm.
PREREQUISITES
-------------
Before you can build DB_File you must have the following installed on
your system:
* Perl 5.004_05 or greater.
* Berkeley DB.
The official web site for Berkeley DB is http://www.sleepycat.com.
The latest version of Berkeley DB is always available there. It
is recommended that you use the most recent version available at
the Sleepycat site.
The one exception to this advice is where you want to use DB_File
to access database files created by a third-party application, like
Sendmail or Netscape. In these cases you must build DB_File with a
compatible version of Berkeley DB.
If you want to use Berkeley DB 2.x, you must have version 2.3.4
or greater. If you want to use Berkeley DB 3.x or 4.x, any version
will do. For Berkeley DB 1.x, use either version 1.85 or 1.86.
BUILDING THE MODULE
-------------------
Assuming you have met all the prerequisites, building the module should
be relatively straightforward.
Step 1 : If you are running either Solaris 2.5 or HP-UX 10 and want
to use Berkeley DB version 2, 3 or 4, read either the Solaris Notes
or HP-UX Notes sections below. If you are running Linux please
read the Linux Notes section before proceeding.
Step 2 : Edit the file config.in to suit you local installation.
Instructions are given in the file.
Step 3 : Build and test the module using this sequence of commands:
perl Makefile.PL
make
make test
NOTE:
If you have a very old version of Berkeley DB (i.e. pre 1.85),
three of the tests in the recno test harness may fail (tests 51,
53 and 55). You can safely ignore the errors if you're never
going to use the broken functionality (recno databases with a
modified bval). Otherwise you'll have to upgrade your DB
library.
INSTALLATION
------------
make install
TROUBLESHOOTING
===============
Here are some of the common problems people encounter when building
DB_File.
Missing db.h or libdb.a
-----------------------
If you get an error like this:
cc -c -I/usr/local/include -Dbool=char -DHAS_BOOL
-O2 -DVERSION=\"1.64\" -DXS_VERSION=\"1.64\" -fpic
-I/usr/local/lib/perl5/i586-linux/5.00404/CORE -DmDB_Prefix_t=size_t
-DmDB_Hash_t=u_int32_t DB_File.c
DB_File.xs:101: db.h: No such file or directory
or this:
LD_RUN_PATH="/lib" cc -o blib/arch/auto/DB_File/DB_File.so -shared
-L/usr/local/lib DB_File.o -L/usr/local/lib -ldb
ld: cannot open -ldb: No such file or directory
This symptom can imply:
1. You don't have Berkeley DB installed on your system at all.
Solution: get & install Berkeley DB.
2. You do have Berkeley DB installed, but it isn't in a standard place.
Solution: Edit config.in and set the LIB and INCLUDE variables to point
to the directories where libdb.a and db.h are installed.
Undefined symbol db_version
---------------------------
DB_File seems to have built correctly, but you get an error like this
when you run the test harness:
$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl5.00404 -I./blib/arch -I./blib/lib
-I/usr/local/lib/perl5/i586-linux/5.00404 -I/usr/local/lib/perl5 -e 'use
Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/db-btree..........Can't load './blib/arch/auto/DB_File/DB_File.so' for
module DB_File: ./blib/arch/auto/DB_File/DB_File.so: undefined symbol:
db_version at /usr/local/lib/perl5/i586-linux/5.00404/DynaLoader.pm
line 166.
at t/db-btree.t line 21
BEGIN failed--compilation aborted at t/db-btree.t line 21.
dubious Test returned status 2 (wstat 512, 0x200)
This error usually happens when you have both version 1 and version
2 of Berkeley DB installed on your system and DB_File attempts to
build using the db.h for Berkeley DB version 2 and the version 1
library. Unfortunately the two versions aren't compatible with each
other. The undefined symbol error is actually caused because Berkeley
DB version 1 doesn't have the symbol db_version.
Solution: Setting the LIB & INCLUDE variables in config.in to point to the
correct directories can sometimes be enough to fix this
problem. If that doesn't work the easiest way to fix the
problem is to either delete or temporarily rename the copies
of db.h and libdb.a that you don't want DB_File to use.
Undefined symbol dbopen
-----------------------
DB_File seems to have built correctly, but you get an error like this
when you run the test harness:
...
t/db-btree..........Can't load 'blib/arch/auto/DB_File/DB_File.so' for
module DB_File: blib/arch/auto/DB_File/DB_File.so: undefined symbol:
dbopen at /usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
at t/db-btree.t line 23
Compilation failed in require at t/db-btree.t line 23.
...
This error usually happens when you have both version 1 and a more recent
version of Berkeley DB installed on your system and DB_File attempts
to build using the db.h for Berkeley DB version 1 and the newer version
library. Unfortunately the two versions aren't compatible with each
other. The undefined symbol error is actually caused because versions
of Berkeley DB newer than version 1 doesn't have the symbol dbopen.
Solution: Setting the LIB & INCLUDE variables in config.in to point to the
correct directories can sometimes be enough to fix this
problem. If that doesn't work the easiest way to fix the
problem is to either delete or temporarily rename the copies
of db.h and libdb.a that you don't want DB_File to use.
Incompatible versions of db.h and libdb
---------------------------------------
BerkeleyDB seems to have built correctly, but you get an error like this
when you run the test harness:
$ make test
PERL_DL_NONLAZY=1 /home/paul/perl/install/bin/perl5.00560 -Iblib/arch
-Iblib/lib -I/home/paul/perl/install/5.005_60/lib/5.00560/i586-linux
-I/home/paul/perl/install/5.005_60/lib/5.00560 -e 'use Test::Harness
qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/db-btree..........
DB_File needs compatible versions of libdb & db.h
you have db.h version 2.3.7 and libdb version 2.7.5
BEGIN failed--compilation aborted at t/db-btree.t line 21.
...
Another variation on the theme of having two versions of Berkeley DB on
your system.
Solution: Setting the LIB & INCLUDE variables in config.in to point to the
correct directories can sometimes be enough to fix this
problem. If that doesn't work the easiest way to fix the
problem is to either delete or temporarily rename the copies
of db.h and libdb.a that you don't want BerkeleyDB to use.
If you are running Linux, please read the Linux Notes section
below.
Linux Notes
-----------
Newer versions of Linux (e.g. RedHat 6, SuSe 6) ship with a C library
that has version 2.x of Berkeley DB linked into it. This makes it
difficult to build this module with anything other than the version of
Berkeley DB that shipped with your Linux release. If you do try to use
a different version of Berkeley DB you will most likely get the error
described in the "Incompatible versions of db.h and libdb" section of
this file.
To make matters worse, prior to Perl 5.6.1, the perl binary itself
*always* included the Berkeley DB library.
If you want to use a newer version of Berkeley DB with this module, the
easiest solution is to use Perl 5.6.1 (or better) and Berkeley DB 3.x
(or better).
There are two approaches you can use to get older versions of Perl to
work with specific versions of Berkeley DB. Both have their advantages
and disadvantages.
The first approach will only work when you want to build a version of
Perl older than 5.6.1 along with Berkeley DB 3.x. If you want to use
Berkeley DB 2.x, you must use the next approach. This approach involves
rebuilding your existing version of Perl after applying an unofficial
patch. The "patches" directory in the this module's source distribution
contains a number of patch files. There is one patch file for every
stable version of Perl since 5.004. Apply the appropriate patch to your
Perl source tree before re-building and installing Perl from scratch.
For example, assuming you are in the top-level source directory for
Perl 5.6.0, the command below will apply the necessary patch. Remember
to replace the path shown below with one that points to this module's
patches directory.
patch -p1 -N </path/to/DB_File/patches/5.6.0
Now rebuild & install perl. You should now have a perl binary that can
be used to build this module. Follow the instructions in "BUILDING THE
MODULE", remembering to set the INCLUDE and LIB variables in config.in.
The second approach will work with both Berkeley DB 2.x and 3.x.
Start by building Berkeley DB as a shared library. This is from
the Berkeley DB build instructions:
Building Shared Libraries for the GNU GCC compiler
If you're using gcc and there's no better shared library example for
your architecture, the following shared library build procedure will
probably work.
Add the -fpic option to the CFLAGS value in the Makefile.
Rebuild all of your .o files. This will create a Berkeley DB library
that contains .o files with PIC code. To build the shared library,
then take the following steps in the library build directory:
% mkdir tmp
% cd tmp
% ar xv ../libdb.a
% gcc -shared -o libdb.so *.o
% mv libdb.so ..
% cd ..
% rm -rf tmp
Note, you may have to change the gcc line depending on the
requirements of your system.
The file libdb.so is your shared library
Once you have built libdb.so, you will need to store it somewhere safe.
cp libdb.so /usr/local/BerkeleyDB/lib
If you now set the LD_PRELOAD environment variable to point to this
shared library, Perl will use it instead of the version of Berkeley DB
that shipped with your Linux distribution.
export LD_PRELOAD=/usr/local/BerkeleyDB/lib/libdb.so
Finally follow the instructions in "BUILDING THE MODULE" to build,
test and install this module. Don't forget to set the INCLUDE and LIB
variables in config.in.
Remember, you will need to have the LD_PRELOAD variable set anytime you
want to use Perl with Berkeley DB. Also note that if you have LD_PRELOAD
permanently set it will affect ALL commands you execute. This may be a
problem if you run any commands that access a database created by the
version of Berkeley DB that shipped with your Linux distribution.
Solaris Notes
-------------
If you are running Solaris 2.5, and you get this error when you run the
DB_File test harness:
libc internal error: _rmutex_unlock: rmutex not held.
you probably need to install a Sun patch. It has been reported that
Sun patch 103187-25 (or later revisions) fixes this problem.
To find out if you have the patch installed, the command "showrev -p"
will display the patches that are currently installed on your system.
HP-UX 10 Notes
--------------
Some people running HP-UX 10 have reported getting an error like this
when building DB_File with the native HP-UX compiler.
ld: (Warning) At least one PA 2.0 object file (DB_File.o) was detected.
The linked output may not run on a PA 1.x system.
ld: Invalid loader fixup for symbol "$000000A5".
If this is the case for you, Berkeley DB needs to be recompiled with
the +z or +Z option and the resulting library placed in a .sl file. The
following steps should do the trick:
1: Configure the Berkeley DB distribution with the +z or +Z C compiler
flag:
env "CFLAGS=+z" ../dist/configure ...
2: Edit the Berkeley DB Makefile and change:
"libdb= libdb.a" to "libdb= libdb.sl".
3: Build and install the Berkeley DB distribution as usual.
HP-UX 11 Notes
--------------
Some people running the combination of HP-UX 11 and Berkeley DB 2.7.7 have
reported getting this error when the run the test harness for DB_File
...
lib/db-btree.........Can't call method "DELETE" on an undefined value at lib/db-btree.t line 216.
FAILED at test 26
lib/db-hash..........Can't call method "DELETE" on an undefined value at lib/db-hash.t line 183.
FAILED at test 22
...
The fix for this is to rebuild and install Berkeley DB with the bigfile
option disabled.
IRIX NOTES
----------
If you are running IRIX, and want to use Berkeley DB version 1, you can
get it from http://reality.sgi.com/ariel. It has the patches necessary
to compile properly on IRIX 5.3.
FEEDBACK
========
How to report a problem with DB_File.
When reporting any problem, I need the information requested below.
1. The *complete* output from running this
perl -V
Do not edit the output in any way.
Note, I want you to run "perl -V" and NOT "perl -v".
If your perl does not understand the "-V" option it is too
old. DB_File needs Perl version 5.00405 or better.
2. The version of DB_File you have.
If you have successfully installed DB_File, this one-liner will
tell you:
perl -e 'use DB_File; print qq{DB_File ver $DB_File::VERSION\n}'
If you haven't installed DB_File then search DB_File.pm for a line
like this:
$VERSION = "1.20" ;
3. The version of Berkeley DB you are using.
If you are using a version older than 1.85, think about upgrading. One
point to note if you are considering upgrading Berkeley DB - the
file formats for 1.85, 1.86, 2.0, 3.0 & 3.1 are all different.
If you have successfully installed DB_File, this command will display
the version of Berkeley DB it was built with:
perl -e 'use DB_File; print qq{Berkeley DB ver $DB_File::db_ver\n}'
4. A copy the file config.in from the DB_File main source directory.
5. A listing of directories where Berkeley DB is installed.
For example, if Berkeley DB is installed in /usr/BerkeleDB/lib and
/usr/BerkeleyDB/include, I need the output from running this
ls -l /usr/BerkeleyDB/lib
ls -l /usr/BerkeleyDB/include
6. If you are having problems building DB_File, send me a complete log
of what happened. Start by unpacking the DB_File module into a fresh
directory and keep a log of all the steps
[edit config.in, if necessary]
perl Makefile.PL
make
make test TEST_VERBOSE=1
7. Now the difficult one. If you think you have found a bug in DB_File
and you want me to fix it, you will *greatly* enhance the chances
of me being able to track it down by sending me a small
self-contained Perl script that illustrates the problem you are
encountering. Include a summary of what you think the problem is
and a log of what happens when you run the script, in case I can't
reproduce your problem on my system. If possible, don't have the
script dependent on an existing 20Meg database. If the script you
send me can create the database itself then that is preferred.
I realise that in some cases this is easier said than done, so if
you can only reproduce the problem in your existing script, then
you can post me that if you want. Just don't expect me to find your
problem in a hurry, or at all. :-)
CHANGES
-------
See the Changes file.
Paul Marquess <Paul.Marquess@btinternet.com>

View File

@ -0,0 +1,97 @@
# Filename: config.in
#
# written by Paul Marquess <Paul.Marquess@btinternet.com>
# last modified 9th Sept 1997
# version 1.55
# 1. Where is the file db.h?
#
# Change the path below to point to the directory where db.h is
# installed on your system.
INCLUDE = /usr/local/BerkeleyDB/include
#INCLUDE = /usr/local/include
#INCLUDE = /usr/include
# 2. Where is libdb?
#
# Change the path below to point to the directory where libdb is
# installed on your system.
LIB = /usr/local/BerkeleyDB/lib
#LIB = /usr/local/lib
#LIB = /usr/lib
# 3. What version of Berkely DB have you got?
#
# If you have version 2.0 or greater, you can skip this question.
#
# If you have Berkeley DB 1.78 or greater you shouldn't have to
# change the definitions for PREFIX and HASH below.
#
# For older versions of Berkeley DB change both PREFIX and HASH to int.
# Version 1.71, 1.72 and 1.73 are known to need this change.
#
# If you don't know what version you have have a look in the file db.h.
#
# Search for the string "DB_VERSION_MAJOR". If it is present, you
# have Berkeley DB version 2 (or greater).
#
# If that didn't work, find the definition of the BTREEINFO typedef.
# Check the return type from the prefix element. It should look like
# this in an older copy of db.h:
#
# int (*prefix) __P((const DBT *, const DBT *));
#
# and like this in a more recent copy:
#
# size_t (*prefix) /* prefix function */
# __P((const DBT *, const DBT *));
#
# Change the definition of PREFIX, below, to reflect the return type
# of the prefix function in your db.h.
#
# Now find the definition of the HASHINFO typedef. Check the return
# type of the hash element. Older versions look like this:
#
# int (*hash) __P((const void *, size_t));
#
# newer like this:
#
# u_int32_t /* hash function */
# (*hash) __P((const void *, size_t));
#
# Change the definition of HASH, below, to reflect the return type of
# the hash function in your db.h.
#
PREFIX = size_t
HASH = u_int32_t
# 4. Is the library called libdb?
#
# If you have copies of both 1.x and 2.x Berkeley DB installed on
# your system it can sometimes be tricky to make sure you are using
# the correct one. Renaming one (or creating a symbolic link) to
# include the version number of the library can help.
#
# For example, if you have both Berkeley DB 2.3.12 and 1.85 on your
# system and you want to use the Berkeley DB version 2 library you
# could rename the version 2 library from libdb.a to libdb-2.3.12.a and
# change the DBNAME line below to look like this:
#
# DBNAME = -ldb-2.3.12
#
# That will ensure you are linking the correct version of the DB
# library.
#
# Note: If you are building this module with Win32, -llibdb will be
# used by default.
#
# If you have changed the name of the library, uncomment the line
# below (by removing the leading #) and edit the line to use the name
# you have picked.
#DBNAME = -ldb-2.4.10
# end of file config.in

112
bdb/perl/DB_File/dbinfo Normal file
View File

@ -0,0 +1,112 @@
#!/usr/local/bin/perl
# Name: dbinfo -- identify berkeley DB version used to create
# a database file
#
# Author: Paul Marquess <Paul.Marquess@btinternet.com>
# Version: 1.03
# Date 17th September 2000
#
# Copyright (c) 1998-2002 Paul Marquess. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
# Todo: Print more stats on a db file, e.g. no of records
# add log/txn/lock files
use strict ;
my %Data =
(
0x053162 => {
Type => "Btree",
Versions =>
{
1 => "Unknown (older than 1.71)",
2 => "Unknown (older than 1.71)",
3 => "1.71 -> 1.85, 1.86",
4 => "Unknown",
5 => "2.0.0 -> 2.3.0",
6 => "2.3.1 -> 2.7.7",
7 => "3.0.x",
8 => "3.1.x -> 4.0.x",
9 => "4.1.x or greater",
}
},
0x061561 => {
Type => "Hash",
Versions =>
{
1 => "Unknown (older than 1.71)",
2 => "1.71 -> 1.85",
3 => "1.86",
4 => "2.0.0 -> 2.1.0",
5 => "2.2.6 -> 2.7.7",
6 => "3.0.x",
7 => "3.1.x -> 4.0.x",
8 => "4.1.x or greater",
}
},
0x042253 => {
Type => "Queue",
Versions =>
{
1 => "3.0.x",
2 => "3.1.x",
3 => "3.2.x -> 4.0.x",
4 => "4.1.x or greater",
}
},
) ;
die "Usage: dbinfo file\n" unless @ARGV == 1 ;
print "testing file $ARGV[0]...\n\n" ;
open (F, "<$ARGV[0]") or die "Cannot open file $ARGV[0]: $!\n" ;
my $buff ;
read F, $buff, 20 ;
my (@info) = unpack("NNNNN", $buff) ;
my (@info1) = unpack("VVVVV", $buff) ;
my ($magic, $version, $endian) ;
if ($Data{$info[0]}) # first try DB 1.x format
{
$magic = $info[0] ;
$version = $info[1] ;
$endian = "Unknown" ;
}
elsif ($Data{$info[3]}) # next DB 2.x big endian
{
$magic = $info[3] ;
$version = $info[4] ;
$endian = "Big Endian" ;
}
elsif ($Data{$info1[3]}) # next DB 2.x little endian
{
$magic = $info1[3] ;
$version = $info1[4] ;
$endian = "Little Endian" ;
}
else
{ die "not a Berkeley DB database file.\n" }
my $type = $Data{$magic} ;
$magic = sprintf "%06X", $magic ;
my $ver_string = "Unknown" ;
$ver_string = $type->{Versions}{$version}
if defined $type->{Versions}{$version} ;
print <<EOM ;
File Type: Berkeley DB $type->{Type} file.
File Version ID: $version
Built with Berkeley DB: $ver_string
Byte Order: $endian
Magic: $magic
EOM
close F ;
exit ;

455
bdb/perl/DB_File/fallback.h Normal file
View File

@ -0,0 +1,455 @@
#define PERL_constant_NOTFOUND 1
#define PERL_constant_NOTDEF 2
#define PERL_constant_ISIV 3
#define PERL_constant_ISNO 4
#define PERL_constant_ISNV 5
#define PERL_constant_ISPV 6
#define PERL_constant_ISPVN 7
#define PERL_constant_ISSV 8
#define PERL_constant_ISUNDEF 9
#define PERL_constant_ISUV 10
#define PERL_constant_ISYES 11
#ifndef NVTYPE
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
#endif
#ifndef aTHX_
#define aTHX_ /* 5.6 or later define this for threading support. */
#endif
#ifndef pTHX_
#define pTHX_ /* 5.6 or later define this for threading support. */
#endif
static int
constant_6 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
DB_TXN R_LAST R_NEXT R_PREV */
/* Offset 2 gives the best switch position. */
switch (name[2]) {
case 'L':
if (memEQ(name, "R_LAST", 6)) {
/* ^ */
#ifdef R_LAST
*iv_return = R_LAST;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'N':
if (memEQ(name, "R_NEXT", 6)) {
/* ^ */
#ifdef R_NEXT
*iv_return = R_NEXT;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'P':
if (memEQ(name, "R_PREV", 6)) {
/* ^ */
#ifdef R_PREV
*iv_return = R_PREV;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case '_':
if (memEQ(name, "DB_TXN", 6)) {
/* ^ */
#ifdef DB_TXN
*iv_return = DB_TXN;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
return PERL_constant_NOTFOUND;
}
static int
constant_7 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
DB_LOCK R_FIRST R_NOKEY */
/* Offset 3 gives the best switch position. */
switch (name[3]) {
case 'I':
if (memEQ(name, "R_FIRST", 7)) {
/* ^ */
#ifdef R_FIRST
*iv_return = R_FIRST;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'L':
if (memEQ(name, "DB_LOCK", 7)) {
/* ^ */
#ifdef DB_LOCK
*iv_return = DB_LOCK;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'O':
if (memEQ(name, "R_NOKEY", 7)) {
/* ^ */
#ifdef R_NOKEY
*iv_return = R_NOKEY;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
return PERL_constant_NOTFOUND;
}
static int
constant_8 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
DB_SHMEM R_CURSOR R_IAFTER */
/* Offset 5 gives the best switch position. */
switch (name[5]) {
case 'M':
if (memEQ(name, "DB_SHMEM", 8)) {
/* ^ */
#ifdef DB_SHMEM
*iv_return = DB_SHMEM;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'S':
if (memEQ(name, "R_CURSOR", 8)) {
/* ^ */
#ifdef R_CURSOR
*iv_return = R_CURSOR;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'T':
if (memEQ(name, "R_IAFTER", 8)) {
/* ^ */
#ifdef R_IAFTER
*iv_return = R_IAFTER;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
return PERL_constant_NOTFOUND;
}
static int
constant_9 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
HASHMAGIC RET_ERROR R_IBEFORE */
/* Offset 7 gives the best switch position. */
switch (name[7]) {
case 'I':
if (memEQ(name, "HASHMAGIC", 9)) {
/* ^ */
#ifdef HASHMAGIC
*iv_return = HASHMAGIC;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'O':
if (memEQ(name, "RET_ERROR", 9)) {
/* ^ */
#ifdef RET_ERROR
*iv_return = RET_ERROR;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'R':
if (memEQ(name, "R_IBEFORE", 9)) {
/* ^ */
#ifdef R_IBEFORE
*iv_return = R_IBEFORE;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
return PERL_constant_NOTFOUND;
}
static int
constant_10 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
BTREEMAGIC R_FIXEDLEN R_SNAPSHOT __R_UNUSED */
/* Offset 5 gives the best switch position. */
switch (name[5]) {
case 'E':
if (memEQ(name, "R_FIXEDLEN", 10)) {
/* ^ */
#ifdef R_FIXEDLEN
*iv_return = R_FIXEDLEN;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'M':
if (memEQ(name, "BTREEMAGIC", 10)) {
/* ^ */
#ifdef BTREEMAGIC
*iv_return = BTREEMAGIC;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'N':
if (memEQ(name, "__R_UNUSED", 10)) {
/* ^ */
#ifdef __R_UNUSED
*iv_return = __R_UNUSED;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'P':
if (memEQ(name, "R_SNAPSHOT", 10)) {
/* ^ */
#ifdef R_SNAPSHOT
*iv_return = R_SNAPSHOT;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
return PERL_constant_NOTFOUND;
}
static int
constant_11 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
HASHVERSION RET_SPECIAL RET_SUCCESS R_RECNOSYNC R_SETCURSOR */
/* Offset 10 gives the best switch position. */
switch (name[10]) {
case 'C':
if (memEQ(name, "R_RECNOSYNC", 11)) {
/* ^ */
#ifdef R_RECNOSYNC
*iv_return = R_RECNOSYNC;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'L':
if (memEQ(name, "RET_SPECIAL", 11)) {
/* ^ */
#ifdef RET_SPECIAL
*iv_return = RET_SPECIAL;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'N':
if (memEQ(name, "HASHVERSION", 11)) {
/* ^ */
#ifdef HASHVERSION
*iv_return = HASHVERSION;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'R':
if (memEQ(name, "R_SETCURSOR", 11)) {
/* ^ */
#ifdef R_SETCURSOR
*iv_return = R_SETCURSOR;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'S':
if (memEQ(name, "RET_SUCCESS", 11)) {
/* ^ */
#ifdef RET_SUCCESS
*iv_return = RET_SUCCESS;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
return PERL_constant_NOTFOUND;
}
static int
constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
/* Initially switch on the length of the name. */
/* When generated this function returned values for the list of names given
in this section of perl code. Rather than manually editing these functions
to add or remove constants, which would result in this comment and section
of code becoming inaccurate, we recommend that you edit this section of
code, and use it to regenerate a new set of constant functions which you
then use to replace the originals.
Regenerate these constant functions by feeding this entire source file to
perl -x
#!bleedperl -w
use ExtUtils::Constant qw (constant_types C_constant XS_constant);
my $types = {map {($_, 1)} qw(IV)};
my @names = (qw(BTREEMAGIC BTREEVERSION DB_LOCK DB_SHMEM DB_TXN HASHMAGIC
HASHVERSION MAX_PAGE_NUMBER MAX_PAGE_OFFSET MAX_REC_NUMBER
RET_ERROR RET_SPECIAL RET_SUCCESS R_CURSOR R_DUP R_FIRST
R_FIXEDLEN R_IAFTER R_IBEFORE R_LAST R_NEXT R_NOKEY
R_NOOVERWRITE R_PREV R_RECNOSYNC R_SETCURSOR R_SNAPSHOT
__R_UNUSED));
print constant_types(); # macro defs
foreach (C_constant ("DB_File", 'constant', 'IV', $types, undef, 3, @names) ) {
print $_, "\n"; # C constant subs
}
print "#### XS Section:\n";
print XS_constant ("DB_File", $types);
__END__
*/
switch (len) {
case 5:
if (memEQ(name, "R_DUP", 5)) {
#ifdef R_DUP
*iv_return = R_DUP;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 6:
return constant_6 (aTHX_ name, iv_return);
break;
case 7:
return constant_7 (aTHX_ name, iv_return);
break;
case 8:
return constant_8 (aTHX_ name, iv_return);
break;
case 9:
return constant_9 (aTHX_ name, iv_return);
break;
case 10:
return constant_10 (aTHX_ name, iv_return);
break;
case 11:
return constant_11 (aTHX_ name, iv_return);
break;
case 12:
if (memEQ(name, "BTREEVERSION", 12)) {
#ifdef BTREEVERSION
*iv_return = BTREEVERSION;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 13:
if (memEQ(name, "R_NOOVERWRITE", 13)) {
#ifdef R_NOOVERWRITE
*iv_return = R_NOOVERWRITE;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 14:
if (memEQ(name, "MAX_REC_NUMBER", 14)) {
#ifdef MAX_REC_NUMBER
*iv_return = MAX_REC_NUMBER;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 15:
/* Names all of length 15. */
/* MAX_PAGE_NUMBER MAX_PAGE_OFFSET */
/* Offset 9 gives the best switch position. */
switch (name[9]) {
case 'N':
if (memEQ(name, "MAX_PAGE_NUMBER", 15)) {
/* ^ */
#ifdef MAX_PAGE_NUMBER
*iv_return = MAX_PAGE_NUMBER;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
case 'O':
if (memEQ(name, "MAX_PAGE_OFFSET", 15)) {
/* ^ */
#ifdef MAX_PAGE_OFFSET
*iv_return = MAX_PAGE_OFFSET;
return PERL_constant_ISIV;
#else
return PERL_constant_NOTDEF;
#endif
}
break;
}
break;
}
return PERL_constant_NOTFOUND;
}

View File

@ -0,0 +1,88 @@
void
constant(sv)
PREINIT:
#ifdef dXSTARG
dXSTARG; /* Faster if we have it. */
#else
dTARGET;
#endif
STRLEN len;
int type;
IV iv;
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
switch (type) {
case PERL_constant_NOTFOUND:
sv = sv_2mortal(newSVpvf("%s is not a valid DB_File macro", s));
PUSHs(sv);
break;
case PERL_constant_NOTDEF:
sv = sv_2mortal(newSVpvf(
"Your vendor has not defined DB_File macro %s, used", s));
PUSHs(sv);
break;
case PERL_constant_ISIV:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHi(iv);
break;
/* Uncomment this if you need to return NOs
case PERL_constant_ISNO:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHs(&PL_sv_no);
break; */
/* Uncomment this if you need to return NVs
case PERL_constant_ISNV:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHn(nv);
break; */
/* Uncomment this if you need to return PVs
case PERL_constant_ISPV:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHp(pv, strlen(pv));
break; */
/* Uncomment this if you need to return PVNs
case PERL_constant_ISPVN:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHp(pv, iv);
break; */
/* Uncomment this if you need to return SVs
case PERL_constant_ISSV:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHs(sv);
break; */
/* Uncomment this if you need to return UNDEFs
case PERL_constant_ISUNDEF:
break; */
/* Uncomment this if you need to return UVs
case PERL_constant_ISUV:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHu((UV)iv);
break; */
/* Uncomment this if you need to return YESs
case PERL_constant_ISYES:
EXTEND(SP, 1);
PUSHs(&PL_sv_undef);
PUSHs(&PL_sv_yes);
break; */
default:
sv = sv_2mortal(newSVpvf(
"Unexpected return type %d while processing DB_File macro %s, used",
type, s));
PUSHs(sv);
}

View File

@ -0,0 +1,3 @@
# Need to add an extra '-lc' to the end to work around a DYNIX/ptx bug
$self->{LIBS} = ['-lm -lc'];

View File

@ -0,0 +1,2 @@
# osr5 needs to explicitly link against libc to pull in some static symbols
$self->{LIBS} = ['-ldb -lc'] if $Config{'osvers'} =~ '3\.2v5\.0\..' ;

View File

@ -0,0 +1,44 @@
diff perl5.004.orig/Configure perl5.004/Configure
190a191
> perllibs=''
9904a9906,9913
> : Remove libraries needed only for extensions
> : The appropriate ext/Foo/Makefile.PL will add them back in, if
> : necessary.
> set X `echo " $libs " |
> sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
> shift
> perllibs="$*"
>
10372a10382
> perllibs='$perllibs'
diff perl5.004.orig/Makefile.SH perl5.004/Makefile.SH
122c122
< libs = $libs $cryptlib
---
> libs = $perllibs $cryptlib
Common subdirectories: perl5.004.orig/Porting and perl5.004/Porting
Common subdirectories: perl5.004.orig/cygwin32 and perl5.004/cygwin32
Common subdirectories: perl5.004.orig/eg and perl5.004/eg
Common subdirectories: perl5.004.orig/emacs and perl5.004/emacs
Common subdirectories: perl5.004.orig/ext and perl5.004/ext
Common subdirectories: perl5.004.orig/h2pl and perl5.004/h2pl
Common subdirectories: perl5.004.orig/hints and perl5.004/hints
Common subdirectories: perl5.004.orig/lib and perl5.004/lib
diff perl5.004.orig/myconfig perl5.004/myconfig
38c38
< libs=$libs
---
> libs=$perllibs
Common subdirectories: perl5.004.orig/os2 and perl5.004/os2
diff perl5.004.orig/patchlevel.h perl5.004/patchlevel.h
40a41
> ,"NODB-1.0 - remove -ldb from core perl binary."
Common subdirectories: perl5.004.orig/plan9 and perl5.004/plan9
Common subdirectories: perl5.004.orig/pod and perl5.004/pod
Common subdirectories: perl5.004.orig/qnx and perl5.004/qnx
Common subdirectories: perl5.004.orig/t and perl5.004/t
Common subdirectories: perl5.004.orig/utils and perl5.004/utils
Common subdirectories: perl5.004.orig/vms and perl5.004/vms
Common subdirectories: perl5.004.orig/win32 and perl5.004/win32
Common subdirectories: perl5.004.orig/x2p and perl5.004/x2p

View File

@ -0,0 +1,217 @@
diff -rc perl5.004_01.orig/Configure perl5.004_01/Configure
*** perl5.004_01.orig/Configure Wed Jun 11 00:28:03 1997
--- perl5.004_01/Configure Sun Nov 12 22:12:35 2000
***************
*** 188,193 ****
--- 188,194 ----
mv=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 9907,9912 ****
--- 9908,9921 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 10375,10380 ****
--- 10384,10390 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.004_01.orig/Makefile.SH perl5.004_01/Makefile.SH
*** perl5.004_01.orig/Makefile.SH Thu Jun 12 23:27:56 1997
--- perl5.004_01/Makefile.SH Sun Nov 12 22:12:35 2000
***************
*** 126,132 ****
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 126,132 ----
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.004_01.orig/lib/ExtUtils/Embed.pm perl5.004_01/lib/ExtUtils/Embed.pm
*** perl5.004_01.orig/lib/ExtUtils/Embed.pm Wed Apr 2 22:12:04 1997
--- perl5.004_01/lib/ExtUtils/Embed.pm Sun Nov 12 22:12:35 2000
***************
*** 170,176 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 170,176 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.004_01.orig/lib/ExtUtils/Liblist.pm perl5.004_01/lib/ExtUtils/Liblist.pm
*** perl5.004_01.orig/lib/ExtUtils/Liblist.pm Sat Jun 7 01:19:44 1997
--- perl5.004_01/lib/ExtUtils/Liblist.pm Sun Nov 12 22:13:27 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $Verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
print STDOUT "Potential libraries are '$potential_libs':\n" if $Verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $Verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
print STDOUT "Potential libraries are '$potential_libs':\n" if $Verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 186,196 ****
my($self, $potential_libs, $Verbose) = @_;
# If user did not supply a list, we punt.
! # (caller should probably use the list in $Config{libs})
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
--- 186,196 ----
my($self, $potential_libs, $Verbose) = @_;
# If user did not supply a list, we punt.
! # (caller should probably use the list in $Config{perllibs})
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
***************
*** 540,546 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 540,546 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
diff -rc perl5.004_01.orig/lib/ExtUtils/MM_Unix.pm perl5.004_01/lib/ExtUtils/MM_Unix.pm
*** perl5.004_01.orig/lib/ExtUtils/MM_Unix.pm Thu Jun 12 22:06:18 1997
--- perl5.004_01/lib/ExtUtils/MM_Unix.pm Sun Nov 12 22:12:35 2000
***************
*** 2137,2143 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2137,2143 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -rc perl5.004_01.orig/myconfig perl5.004_01/myconfig
*** perl5.004_01.orig/myconfig Sat Dec 21 01:13:20 1996
--- perl5.004_01/myconfig Sun Nov 12 22:12:35 2000
***************
*** 35,41 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
--- 35,41 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
diff -rc perl5.004_01.orig/patchlevel.h perl5.004_01/patchlevel.h
*** perl5.004_01.orig/patchlevel.h Wed Jun 11 03:06:10 1997
--- perl5.004_01/patchlevel.h Sun Nov 12 22:12:35 2000
***************
*** 38,43 ****
--- 38,44 ----
*/
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,217 @@
diff -rc perl5.004_02.orig/Configure perl5.004_02/Configure
*** perl5.004_02.orig/Configure Thu Aug 7 15:08:44 1997
--- perl5.004_02/Configure Sun Nov 12 22:06:24 2000
***************
*** 188,193 ****
--- 188,194 ----
mv=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 9911,9916 ****
--- 9912,9925 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 10379,10384 ****
--- 10388,10394 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.004_02.orig/Makefile.SH perl5.004_02/Makefile.SH
*** perl5.004_02.orig/Makefile.SH Thu Aug 7 13:10:53 1997
--- perl5.004_02/Makefile.SH Sun Nov 12 22:06:24 2000
***************
*** 126,132 ****
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 126,132 ----
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.004_02.orig/lib/ExtUtils/Embed.pm perl5.004_02/lib/ExtUtils/Embed.pm
*** perl5.004_02.orig/lib/ExtUtils/Embed.pm Fri Aug 1 15:08:44 1997
--- perl5.004_02/lib/ExtUtils/Embed.pm Sun Nov 12 22:06:24 2000
***************
*** 178,184 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 178,184 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.004_02.orig/lib/ExtUtils/Liblist.pm perl5.004_02/lib/ExtUtils/Liblist.pm
*** perl5.004_02.orig/lib/ExtUtils/Liblist.pm Fri Aug 1 19:36:58 1997
--- perl5.004_02/lib/ExtUtils/Liblist.pm Sun Nov 12 22:06:24 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
print STDOUT "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
print STDOUT "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 186,196 ****
my($self, $potential_libs, $verbose) = @_;
# If user did not supply a list, we punt.
! # (caller should probably use the list in $Config{libs})
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
--- 186,196 ----
my($self, $potential_libs, $verbose) = @_;
# If user did not supply a list, we punt.
! # (caller should probably use the list in $Config{perllibs})
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
***************
*** 540,546 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 540,546 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
diff -rc perl5.004_02.orig/lib/ExtUtils/MM_Unix.pm perl5.004_02/lib/ExtUtils/MM_Unix.pm
*** perl5.004_02.orig/lib/ExtUtils/MM_Unix.pm Tue Aug 5 14:28:08 1997
--- perl5.004_02/lib/ExtUtils/MM_Unix.pm Sun Nov 12 22:06:25 2000
***************
*** 2224,2230 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2224,2230 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -rc perl5.004_02.orig/myconfig perl5.004_02/myconfig
*** perl5.004_02.orig/myconfig Sat Dec 21 01:13:20 1996
--- perl5.004_02/myconfig Sun Nov 12 22:06:25 2000
***************
*** 35,41 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
--- 35,41 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
diff -rc perl5.004_02.orig/patchlevel.h perl5.004_02/patchlevel.h
*** perl5.004_02.orig/patchlevel.h Fri Aug 1 15:07:34 1997
--- perl5.004_02/patchlevel.h Sun Nov 12 22:06:25 2000
***************
*** 38,43 ****
--- 38,44 ----
*/
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,223 @@
diff -rc perl5.004_03.orig/Configure perl5.004_03/Configure
*** perl5.004_03.orig/Configure Wed Aug 13 16:09:46 1997
--- perl5.004_03/Configure Sun Nov 12 21:56:18 2000
***************
*** 188,193 ****
--- 188,194 ----
mv=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 9911,9916 ****
--- 9912,9925 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 10379,10384 ****
--- 10388,10394 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
Only in perl5.004_03: Configure.orig
diff -rc perl5.004_03.orig/Makefile.SH perl5.004_03/Makefile.SH
*** perl5.004_03.orig/Makefile.SH Mon Aug 18 19:24:29 1997
--- perl5.004_03/Makefile.SH Sun Nov 12 21:56:18 2000
***************
*** 126,132 ****
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 126,132 ----
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
Only in perl5.004_03: Makefile.SH.orig
diff -rc perl5.004_03.orig/lib/ExtUtils/Embed.pm perl5.004_03/lib/ExtUtils/Embed.pm
*** perl5.004_03.orig/lib/ExtUtils/Embed.pm Fri Aug 1 15:08:44 1997
--- perl5.004_03/lib/ExtUtils/Embed.pm Sun Nov 12 21:56:18 2000
***************
*** 178,184 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 178,184 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.004_03.orig/lib/ExtUtils/Liblist.pm perl5.004_03/lib/ExtUtils/Liblist.pm
*** perl5.004_03.orig/lib/ExtUtils/Liblist.pm Fri Aug 1 19:36:58 1997
--- perl5.004_03/lib/ExtUtils/Liblist.pm Sun Nov 12 21:57:17 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
print STDOUT "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
print STDOUT "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 186,196 ****
my($self, $potential_libs, $verbose) = @_;
# If user did not supply a list, we punt.
! # (caller should probably use the list in $Config{libs})
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
--- 186,196 ----
my($self, $potential_libs, $verbose) = @_;
# If user did not supply a list, we punt.
! # (caller should probably use the list in $Config{perllibs})
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
***************
*** 540,546 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 540,546 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
Only in perl5.004_03/lib/ExtUtils: Liblist.pm.orig
Only in perl5.004_03/lib/ExtUtils: Liblist.pm.rej
diff -rc perl5.004_03.orig/lib/ExtUtils/MM_Unix.pm perl5.004_03/lib/ExtUtils/MM_Unix.pm
*** perl5.004_03.orig/lib/ExtUtils/MM_Unix.pm Mon Aug 18 19:16:12 1997
--- perl5.004_03/lib/ExtUtils/MM_Unix.pm Sun Nov 12 21:56:19 2000
***************
*** 2224,2230 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2224,2230 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
Only in perl5.004_03/lib/ExtUtils: MM_Unix.pm.orig
diff -rc perl5.004_03.orig/myconfig perl5.004_03/myconfig
*** perl5.004_03.orig/myconfig Sat Dec 21 01:13:20 1996
--- perl5.004_03/myconfig Sun Nov 12 21:56:19 2000
***************
*** 35,41 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
--- 35,41 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
diff -rc perl5.004_03.orig/patchlevel.h perl5.004_03/patchlevel.h
*** perl5.004_03.orig/patchlevel.h Wed Aug 13 11:42:01 1997
--- perl5.004_03/patchlevel.h Sun Nov 12 21:56:19 2000
***************
*** 38,43 ****
--- 38,44 ----
*/
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};
Only in perl5.004_03: patchlevel.h.orig

View File

@ -0,0 +1,209 @@
diff -rc perl5.004_04.orig/Configure perl5.004_04/Configure
*** perl5.004_04.orig/Configure Fri Oct 3 18:57:39 1997
--- perl5.004_04/Configure Sun Nov 12 21:50:51 2000
***************
*** 188,193 ****
--- 188,194 ----
mv=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 9910,9915 ****
--- 9911,9924 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 10378,10383 ****
--- 10387,10393 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.004_04.orig/Makefile.SH perl5.004_04/Makefile.SH
*** perl5.004_04.orig/Makefile.SH Wed Oct 15 10:33:16 1997
--- perl5.004_04/Makefile.SH Sun Nov 12 21:50:51 2000
***************
*** 129,135 ****
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 129,135 ----
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.004_04.orig/lib/ExtUtils/Embed.pm perl5.004_04/lib/ExtUtils/Embed.pm
*** perl5.004_04.orig/lib/ExtUtils/Embed.pm Fri Aug 1 15:08:44 1997
--- perl5.004_04/lib/ExtUtils/Embed.pm Sun Nov 12 21:50:51 2000
***************
*** 178,184 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 178,184 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.004_04.orig/lib/ExtUtils/Liblist.pm perl5.004_04/lib/ExtUtils/Liblist.pm
*** perl5.004_04.orig/lib/ExtUtils/Liblist.pm Tue Sep 9 17:41:32 1997
--- perl5.004_04/lib/ExtUtils/Liblist.pm Sun Nov 12 21:51:33 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 189,195 ****
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
--- 189,195 ----
return ("", "", "", "") unless $potential_libs;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my($libpth) = $Config{'libpth'};
my($libext) = $Config{'lib_ext'} || ".lib";
***************
*** 539,545 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 539,545 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
diff -rc perl5.004_04.orig/lib/ExtUtils/MM_Unix.pm perl5.004_04/lib/ExtUtils/MM_Unix.pm
*** perl5.004_04.orig/lib/ExtUtils/MM_Unix.pm Wed Oct 8 14:13:51 1997
--- perl5.004_04/lib/ExtUtils/MM_Unix.pm Sun Nov 12 21:50:51 2000
***************
*** 2229,2235 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2229,2235 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -rc perl5.004_04.orig/myconfig perl5.004_04/myconfig
*** perl5.004_04.orig/myconfig Mon Oct 6 18:26:49 1997
--- perl5.004_04/myconfig Sun Nov 12 21:50:51 2000
***************
*** 35,41 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
--- 35,41 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
diff -rc perl5.004_04.orig/patchlevel.h perl5.004_04/patchlevel.h
*** perl5.004_04.orig/patchlevel.h Wed Oct 15 10:55:19 1997
--- perl5.004_04/patchlevel.h Sun Nov 12 21:50:51 2000
***************
*** 39,44 ****
--- 39,45 ----
/* The following line and terminating '};' are read by perlbug.PL. Don't alter. */
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,209 @@
diff -rc perl5.004_05.orig/Configure perl5.004_05/Configure
*** perl5.004_05.orig/Configure Thu Jan 6 22:05:49 2000
--- perl5.004_05/Configure Sun Nov 12 21:36:25 2000
***************
*** 188,193 ****
--- 188,194 ----
mv=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 10164,10169 ****
--- 10165,10178 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 10648,10653 ****
--- 10657,10663 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.004_05.orig/Makefile.SH perl5.004_05/Makefile.SH
*** perl5.004_05.orig/Makefile.SH Thu Jan 6 22:05:49 2000
--- perl5.004_05/Makefile.SH Sun Nov 12 21:36:25 2000
***************
*** 151,157 ****
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 151,157 ----
ext = \$(dynamic_ext) \$(static_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.004_05.orig/lib/ExtUtils/Embed.pm perl5.004_05/lib/ExtUtils/Embed.pm
*** perl5.004_05.orig/lib/ExtUtils/Embed.pm Fri Aug 1 15:08:44 1997
--- perl5.004_05/lib/ExtUtils/Embed.pm Sun Nov 12 21:36:25 2000
***************
*** 178,184 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 178,184 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.004_05.orig/lib/ExtUtils/Liblist.pm perl5.004_05/lib/ExtUtils/Liblist.pm
*** perl5.004_05.orig/lib/ExtUtils/Liblist.pm Thu Jan 6 22:05:54 2000
--- perl5.004_05/lib/ExtUtils/Liblist.pm Sun Nov 12 21:45:31 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 196,202 ****
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'libs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
--- 196,202 ----
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'perllibs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
***************
*** 590,596 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 590,596 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
diff -rc perl5.004_05.orig/lib/ExtUtils/MM_Unix.pm perl5.004_05/lib/ExtUtils/MM_Unix.pm
*** perl5.004_05.orig/lib/ExtUtils/MM_Unix.pm Thu Jan 6 22:05:54 2000
--- perl5.004_05/lib/ExtUtils/MM_Unix.pm Sun Nov 12 21:36:25 2000
***************
*** 2246,2252 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2246,2252 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -rc perl5.004_05.orig/myconfig perl5.004_05/myconfig
*** perl5.004_05.orig/myconfig Thu Jan 6 22:05:55 2000
--- perl5.004_05/myconfig Sun Nov 12 21:43:54 2000
***************
*** 34,40 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
--- 34,40 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
diff -rc perl5.004_05.orig/patchlevel.h perl5.004_05/patchlevel.h
*** perl5.004_05.orig/patchlevel.h Thu Jan 6 22:05:48 2000
--- perl5.004_05/patchlevel.h Sun Nov 12 21:36:25 2000
***************
*** 39,44 ****
--- 39,45 ----
/* The following line and terminating '};' are read by perlbug.PL. Don't alter. */
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,209 @@
diff -rc perl5.005.orig/Configure perl5.005/Configure
*** perl5.005.orig/Configure Wed Jul 15 08:05:44 1998
--- perl5.005/Configure Sun Nov 12 21:30:40 2000
***************
*** 234,239 ****
--- 234,240 ----
nm=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 11279,11284 ****
--- 11280,11293 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 11804,11809 ****
--- 11813,11819 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.005.orig/Makefile.SH perl5.005/Makefile.SH
*** perl5.005.orig/Makefile.SH Sun Jul 19 08:06:35 1998
--- perl5.005/Makefile.SH Sun Nov 12 21:30:40 2000
***************
*** 150,156 ****
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 150,156 ----
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.005.orig/lib/ExtUtils/Embed.pm perl5.005/lib/ExtUtils/Embed.pm
*** perl5.005.orig/lib/ExtUtils/Embed.pm Wed Jul 22 07:45:02 1998
--- perl5.005/lib/ExtUtils/Embed.pm Sun Nov 12 21:30:40 2000
***************
*** 194,200 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 194,200 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.005.orig/lib/ExtUtils/Liblist.pm perl5.005/lib/ExtUtils/Liblist.pm
*** perl5.005.orig/lib/ExtUtils/Liblist.pm Wed Jul 22 07:09:42 1998
--- perl5.005/lib/ExtUtils/Liblist.pm Sun Nov 12 21:30:40 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 290,296 ****
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
--- 290,296 ----
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
***************
*** 598,604 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 598,604 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
diff -rc perl5.005.orig/lib/ExtUtils/MM_Unix.pm perl5.005/lib/ExtUtils/MM_Unix.pm
*** perl5.005.orig/lib/ExtUtils/MM_Unix.pm Tue Jul 14 04:39:12 1998
--- perl5.005/lib/ExtUtils/MM_Unix.pm Sun Nov 12 21:30:41 2000
***************
*** 2281,2287 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2281,2287 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -rc perl5.005.orig/myconfig perl5.005/myconfig
*** perl5.005.orig/myconfig Fri Apr 3 01:20:35 1998
--- perl5.005/myconfig Sun Nov 12 21:30:41 2000
***************
*** 34,40 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
--- 34,40 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
diff -rc perl5.005.orig/patchlevel.h perl5.005/patchlevel.h
*** perl5.005.orig/patchlevel.h Wed Jul 22 19:22:01 1998
--- perl5.005/patchlevel.h Sun Nov 12 21:30:41 2000
***************
*** 39,44 ****
--- 39,45 ----
*/
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,209 @@
diff -rc perl5.005_01.orig/Configure perl5.005_01/Configure
*** perl5.005_01.orig/Configure Wed Jul 15 08:05:44 1998
--- perl5.005_01/Configure Sun Nov 12 20:55:58 2000
***************
*** 234,239 ****
--- 234,240 ----
nm=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 11279,11284 ****
--- 11280,11293 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 11804,11809 ****
--- 11813,11819 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.005_01.orig/Makefile.SH perl5.005_01/Makefile.SH
*** perl5.005_01.orig/Makefile.SH Sun Jul 19 08:06:35 1998
--- perl5.005_01/Makefile.SH Sun Nov 12 20:55:58 2000
***************
*** 150,156 ****
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 150,156 ----
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.005_01.orig/lib/ExtUtils/Embed.pm perl5.005_01/lib/ExtUtils/Embed.pm
*** perl5.005_01.orig/lib/ExtUtils/Embed.pm Wed Jul 22 07:45:02 1998
--- perl5.005_01/lib/ExtUtils/Embed.pm Sun Nov 12 20:55:58 2000
***************
*** 194,200 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 194,200 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.005_01.orig/lib/ExtUtils/Liblist.pm perl5.005_01/lib/ExtUtils/Liblist.pm
*** perl5.005_01.orig/lib/ExtUtils/Liblist.pm Wed Jul 22 07:09:42 1998
--- perl5.005_01/lib/ExtUtils/Liblist.pm Sun Nov 12 20:55:58 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 290,296 ****
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
--- 290,296 ----
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
***************
*** 598,604 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 598,604 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
diff -rc perl5.005_01.orig/lib/ExtUtils/MM_Unix.pm perl5.005_01/lib/ExtUtils/MM_Unix.pm
*** perl5.005_01.orig/lib/ExtUtils/MM_Unix.pm Tue Jul 14 04:39:12 1998
--- perl5.005_01/lib/ExtUtils/MM_Unix.pm Sun Nov 12 20:55:58 2000
***************
*** 2281,2287 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2281,2287 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -rc perl5.005_01.orig/myconfig perl5.005_01/myconfig
*** perl5.005_01.orig/myconfig Fri Apr 3 01:20:35 1998
--- perl5.005_01/myconfig Sun Nov 12 20:55:58 2000
***************
*** 34,40 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
--- 34,40 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
diff -rc perl5.005_01.orig/patchlevel.h perl5.005_01/patchlevel.h
*** perl5.005_01.orig/patchlevel.h Mon Jan 3 11:07:45 2000
--- perl5.005_01/patchlevel.h Sun Nov 12 20:55:58 2000
***************
*** 39,44 ****
--- 39,45 ----
*/
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,264 @@
diff -rc perl5.005_02.orig/Configure perl5.005_02/Configure
*** perl5.005_02.orig/Configure Mon Jan 3 11:12:20 2000
--- perl5.005_02/Configure Sun Nov 12 20:50:51 2000
***************
*** 234,239 ****
--- 234,240 ----
nm=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 11334,11339 ****
--- 11335,11348 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 11859,11864 ****
--- 11868,11874 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
Only in perl5.005_02: Configure.orig
diff -rc perl5.005_02.orig/Makefile.SH perl5.005_02/Makefile.SH
*** perl5.005_02.orig/Makefile.SH Sun Jul 19 08:06:35 1998
--- perl5.005_02/Makefile.SH Sun Nov 12 20:50:51 2000
***************
*** 150,156 ****
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 150,156 ----
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
Only in perl5.005_02: Makefile.SH.orig
diff -rc perl5.005_02.orig/lib/ExtUtils/Embed.pm perl5.005_02/lib/ExtUtils/Embed.pm
*** perl5.005_02.orig/lib/ExtUtils/Embed.pm Wed Jul 22 07:45:02 1998
--- perl5.005_02/lib/ExtUtils/Embed.pm Sun Nov 12 20:50:51 2000
***************
*** 194,200 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 194,200 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.005_02.orig/lib/ExtUtils/Liblist.pm perl5.005_02/lib/ExtUtils/Liblist.pm
*** perl5.005_02.orig/lib/ExtUtils/Liblist.pm Mon Jan 3 11:12:21 2000
--- perl5.005_02/lib/ExtUtils/Liblist.pm Sun Nov 12 20:50:51 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 196,202 ****
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'libs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
--- 196,202 ----
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'perllibs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
***************
*** 333,339 ****
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
--- 333,339 ----
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
***************
*** 623,629 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
--- 623,629 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>
as well as in C<$Config{libpth}>. For each library that is found, a
***************
*** 666,672 ****
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{libs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
--- 666,672 ----
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
***************
*** 676,682 ****
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
! enable searching for default libraries specified by C<$Config{libs}>.
=item *
--- 676,682 ----
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
! enable searching for default libraries specified by C<$Config{perllibs}>.
=item *
Only in perl5.005_02/lib/ExtUtils: Liblist.pm.orig
diff -rc perl5.005_02.orig/lib/ExtUtils/MM_Unix.pm perl5.005_02/lib/ExtUtils/MM_Unix.pm
*** perl5.005_02.orig/lib/ExtUtils/MM_Unix.pm Tue Jul 14 04:39:12 1998
--- perl5.005_02/lib/ExtUtils/MM_Unix.pm Sun Nov 12 20:50:51 2000
***************
*** 2281,2287 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2281,2287 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
Only in perl5.005_02/lib/ExtUtils: MM_Unix.pm.orig
diff -rc perl5.005_02.orig/myconfig perl5.005_02/myconfig
*** perl5.005_02.orig/myconfig Fri Apr 3 01:20:35 1998
--- perl5.005_02/myconfig Sun Nov 12 20:50:51 2000
***************
*** 34,40 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
--- 34,40 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
diff -rc perl5.005_02.orig/patchlevel.h perl5.005_02/patchlevel.h
*** perl5.005_02.orig/patchlevel.h Mon Jan 3 11:12:19 2000
--- perl5.005_02/patchlevel.h Sun Nov 12 20:50:51 2000
***************
*** 40,45 ****
--- 40,46 ----
*/
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

View File

@ -0,0 +1,250 @@
diff -rc perl5.005_03.orig/Configure perl5.005_03/Configure
*** perl5.005_03.orig/Configure Sun Mar 28 17:12:57 1999
--- perl5.005_03/Configure Sun Sep 17 22:19:16 2000
***************
*** 208,213 ****
--- 208,214 ----
nm=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 11642,11647 ****
--- 11643,11656 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 12183,12188 ****
--- 12192,12198 ----
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -rc perl5.005_03.orig/Makefile.SH perl5.005_03/Makefile.SH
*** perl5.005_03.orig/Makefile.SH Thu Mar 4 02:35:25 1999
--- perl5.005_03/Makefile.SH Sun Sep 17 22:21:01 2000
***************
*** 58,67 ****
shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
case "$osvers" in
3*)
! shrpldflags="$shrpldflags -e _nostart $ldflags $libs $cryptlib"
;;
*)
! shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib"
;;
esac
aixinstdir=`pwd | sed 's/\/UU$//'`
--- 58,67 ----
shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
case "$osvers" in
3*)
! shrpldflags="$shrpldflags -e _nostart $ldflags $perllibs $cryptlib"
;;
*)
! shrpldflags="$shrpldflags -b noentry $ldflags $perllibs $cryptlib"
;;
esac
aixinstdir=`pwd | sed 's/\/UU$//'`
***************
*** 155,161 ****
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 155,161 ----
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff -rc perl5.005_03.orig/lib/ExtUtils/Embed.pm perl5.005_03/lib/ExtUtils/Embed.pm
*** perl5.005_03.orig/lib/ExtUtils/Embed.pm Wed Jan 6 02:17:50 1999
--- perl5.005_03/lib/ExtUtils/Embed.pm Sun Sep 17 22:19:16 2000
***************
*** 194,200 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 194,200 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -rc perl5.005_03.orig/lib/ExtUtils/Liblist.pm perl5.005_03/lib/ExtUtils/Liblist.pm
*** perl5.005_03.orig/lib/ExtUtils/Liblist.pm Wed Jan 6 02:17:47 1999
--- perl5.005_03/lib/ExtUtils/Liblist.pm Sun Sep 17 22:19:16 2000
***************
*** 16,33 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 16,33 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 196,202 ****
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'libs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
--- 196,202 ----
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'perllibs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
***************
*** 336,342 ****
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
--- 336,342 ----
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
***************
*** 626,632 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>,
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
--- 626,632 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>,
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
***************
*** 670,676 ****
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{libs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
--- 670,676 ----
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
***************
*** 680,686 ****
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
! enable searching for default libraries specified by C<$Config{libs}>.
=item *
--- 680,686 ----
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
! enable searching for default libraries specified by C<$Config{perllibs}>.
=item *
diff -rc perl5.005_03.orig/lib/ExtUtils/MM_Unix.pm perl5.005_03/lib/ExtUtils/MM_Unix.pm
*** perl5.005_03.orig/lib/ExtUtils/MM_Unix.pm Fri Mar 5 00:34:20 1999
--- perl5.005_03/lib/ExtUtils/MM_Unix.pm Sun Sep 17 22:19:16 2000
***************
*** 2284,2290 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2284,2290 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {

View File

@ -0,0 +1,294 @@
diff -cr perl-5.6.0.orig/Configure perl-5.6.0/Configure
*** perl-5.6.0.orig/Configure Wed Mar 22 20:36:37 2000
--- perl-5.6.0/Configure Sun Sep 17 23:40:15 2000
***************
*** 217,222 ****
--- 217,223 ----
nm=''
nroff=''
perl=''
+ perllibs=''
pg=''
pmake=''
pr=''
***************
*** 14971,14976 ****
--- 14972,14985 ----
shift
extensions="$*"
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " |
+ sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ shift
+ perllibs="$*"
+
: Remove build directory name from cppstdin so it can be used from
: either the present location or the final installed location.
echo " "
***************
*** 15640,15645 ****
--- 15649,15655 ----
path_sep='$path_sep'
perl5='$perl5'
perl='$perl'
+ perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff -cr perl-5.6.0.orig/Makefile.SH perl-5.6.0/Makefile.SH
*** perl-5.6.0.orig/Makefile.SH Sat Mar 11 16:05:24 2000
--- perl-5.6.0/Makefile.SH Sun Sep 17 23:40:15 2000
***************
*** 70,76 ****
*) shrpldflags="$shrpldflags -b noentry"
;;
esac
! shrpldflags="$shrpldflags $ldflags $libs $cryptlib"
linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
;;
hpux*)
--- 70,76 ----
*) shrpldflags="$shrpldflags -b noentry"
;;
esac
! shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
;;
hpux*)
***************
*** 176,182 ****
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $libs $cryptlib
public = perl $suidperl utilities translators
--- 176,182 ----
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
! libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
***************
*** 333,339 ****
case "$osname" in
aix)
$spitshell >>Makefile <<!GROK!THIS!
! LIBS = $libs
# In AIX we need to change this for building Perl itself from
# its earlier definition (which is for building external
# extensions *after* Perl has been built and installed)
--- 333,339 ----
case "$osname" in
aix)
$spitshell >>Makefile <<!GROK!THIS!
! LIBS = $perllibs
# In AIX we need to change this for building Perl itself from
# its earlier definition (which is for building external
# extensions *after* Perl has been built and installed)
diff -cr perl-5.6.0.orig/lib/ExtUtils/Embed.pm perl-5.6.0/lib/ExtUtils/Embed.pm
*** perl-5.6.0.orig/lib/ExtUtils/Embed.pm Sun Jan 23 12:08:32 2000
--- perl-5.6.0/lib/ExtUtils/Embed.pm Sun Sep 17 23:40:15 2000
***************
*** 193,199 ****
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{libs}) if defined $std;
push(@mods, static_ext()) if $std;
--- 193,199 ----
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
! push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff -cr perl-5.6.0.orig/lib/ExtUtils/Liblist.pm perl-5.6.0/lib/ExtUtils/Liblist.pm
*** perl-5.6.0.orig/lib/ExtUtils/Liblist.pm Wed Mar 22 16:16:31 2000
--- perl-5.6.0/lib/ExtUtils/Liblist.pm Sun Sep 17 23:40:15 2000
***************
*** 17,34 ****
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{libs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
--- 17,34 ----
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
! if ($^O =~ 'os2' and $Config{perllibs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
! $potential_libs .= $Config{perllibs};
}
return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
! my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
***************
*** 198,204 ****
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'libs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
--- 198,204 ----
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
! my $libs = $Config{'perllibs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
***************
*** 338,344 ****
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
--- 338,344 ----
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
! push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
***************
*** 624,630 ****
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>,
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
--- 624,630 ----
=item *
If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>,
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
***************
*** 668,674 ****
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{libs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
--- 668,674 ----
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
***************
*** 678,684 ****
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
! enable searching for default libraries specified by C<$Config{libs}>.
=item *
--- 678,684 ----
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
! enable searching for default libraries specified by C<$Config{perllibs}>.
=item *
diff -cr perl-5.6.0.orig/lib/ExtUtils/MM_Unix.pm perl-5.6.0/lib/ExtUtils/MM_Unix.pm
*** perl-5.6.0.orig/lib/ExtUtils/MM_Unix.pm Thu Mar 2 17:52:52 2000
--- perl-5.6.0/lib/ExtUtils/MM_Unix.pm Sun Sep 17 23:40:15 2000
***************
*** 2450,2456 ****
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
--- 2450,2456 ----
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
! MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {
diff -cr perl-5.6.0.orig/myconfig.SH perl-5.6.0/myconfig.SH
*** perl-5.6.0.orig/myconfig.SH Sat Feb 26 06:34:49 2000
--- perl-5.6.0/myconfig.SH Sun Sep 17 23:41:17 2000
***************
*** 48,54 ****
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$libs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
--- 48,54 ----
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
! libs=$perllibs
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
diff -cr perl-5.6.0.orig/patchlevel.h perl-5.6.0/patchlevel.h
*** perl-5.6.0.orig/patchlevel.h Wed Mar 22 20:23:11 2000
--- perl-5.6.0/patchlevel.h Sun Sep 17 23:40:15 2000
***************
*** 70,75 ****
--- 70,76 ----
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
+ ,"NODB-1.0 - remove -ldb from core perl binary."
,NULL
};

329
bdb/perl/DB_File/ppport.h Normal file
View File

@ -0,0 +1,329 @@
/* This file is Based on output from
* Perl/Pollution/Portability Version 2.0000 */
#ifndef _P_P_PORTABILITY_H_
#define _P_P_PORTABILITY_H_
#ifndef PERL_REVISION
# ifndef __PATCHLEVEL_H_INCLUDED__
# include "patchlevel.h"
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
/* Replace: 1 */
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
/* Replace PERL_PATCHLEVEL with PERL_VERSION */
/* Replace: 0 */
# endif
#endif
#define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION)
#ifndef ERRSV
# define ERRSV perl_get_sv("@",FALSE)
#endif
#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))
/* Replace: 1 */
# define PL_Sv Sv
# define PL_compiling compiling
# define PL_copline copline
# define PL_curcop curcop
# define PL_curstash curstash
# define PL_defgv defgv
# define PL_dirty dirty
# define PL_hints hints
# define PL_na na
# define PL_perldb perldb
# define PL_rsfp_filters rsfp_filters
# define PL_rsfp rsfp
# define PL_stdingv stdingv
# define PL_sv_no sv_no
# define PL_sv_undef sv_undef
# define PL_sv_yes sv_yes
/* Replace: 0 */
#endif
#ifndef pTHX
# define pTHX
# define pTHX_
# define aTHX
# define aTHX_
#endif
#ifndef PTR2IV
# define PTR2IV(d) (IV)(d)
#endif
#ifndef INT2PTR
# define INT2PTR(any,d) (any)(d)
#endif
#ifndef dTHR
# ifdef WIN32
# define dTHR extern int Perl___notused
# else
# define dTHR extern int errno
# endif
#endif
#ifndef boolSV
# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
#endif
#ifndef gv_stashpvn
# define gv_stashpvn(str,len,flags) gv_stashpv(str,flags)
#endif
#ifndef newSVpvn
# define newSVpvn(data,len) ((len) ? newSVpv ((data), (len)) : newSVpv ("", 0))
#endif
#ifndef newRV_inc
/* Replace: 1 */
# define newRV_inc(sv) newRV(sv)
/* Replace: 0 */
#endif
/* DEFSV appears first in 5.004_56 */
#ifndef DEFSV
# define DEFSV GvSV(PL_defgv)
#endif
#ifndef SAVE_DEFSV
# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
#endif
#ifndef newRV_noinc
# ifdef __GNUC__
# define newRV_noinc(sv) \
({ \
SV *nsv = (SV*)newRV(sv); \
SvREFCNT_dec(sv); \
nsv; \
})
# else
# if defined(CRIPPLED_CC) || defined(USE_THREADS)
static SV * newRV_noinc (SV * sv)
{
SV *nsv = (SV*)newRV(sv);
SvREFCNT_dec(sv);
return nsv;
}
# else
# define newRV_noinc(sv) \
((PL_Sv=(SV*)newRV(sv), SvREFCNT_dec(sv), (SV*)PL_Sv)
# endif
# endif
#endif
/* Provide: newCONSTSUB */
/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63))
#if defined(NEED_newCONSTSUB)
static
#else
extern void newCONSTSUB _((HV * stash, char * name, SV *sv));
#endif
#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
void
newCONSTSUB(stash,name,sv)
HV *stash;
char *name;
SV *sv;
{
U32 oldhints = PL_hints;
HV *old_cop_stash = PL_curcop->cop_stash;
HV *old_curstash = PL_curstash;
line_t oldline = PL_curcop->cop_line;
PL_curcop->cop_line = PL_copline;
PL_hints &= ~HINT_BLOCK_SCOPE;
if (stash)
PL_curstash = PL_curcop->cop_stash = stash;
newSUB(
#if (PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22))
/* before 5.003_22 */
start_subparse(),
#else
# if (PERL_VERSION == 3) && (PERL_SUBVERSION == 22)
/* 5.003_22 */
start_subparse(0),
# else
/* 5.003_23 onwards */
start_subparse(FALSE, 0),
# endif
#endif
newSVOP(OP_CONST, 0, newSVpv(name,0)),
newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */
newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
);
PL_hints = oldhints;
PL_curcop->cop_stash = old_cop_stash;
PL_curstash = old_curstash;
PL_curcop->cop_line = oldline;
}
#endif
#endif /* newCONSTSUB */
#ifndef START_MY_CXT
/*
* Boilerplate macros for initializing and accessing interpreter-local
* data from C. All statics in extensions should be reworked to use
* this, if you want to make the extension thread-safe. See ext/re/re.xs
* for an example of the use of these macros.
*
* Code that uses these macros is responsible for the following:
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
* 2. Declare a typedef named my_cxt_t that is a structure that contains
* all the data that needs to be interpreter-local.
* 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
* 4. Use the MY_CXT_INIT macro such that it is called exactly once
* (typically put in the BOOT: section).
* 5. Use the members of the my_cxt_t structure everywhere as
* MY_CXT.member.
* 6. Use the dMY_CXT macro (a declaration) in all the functions that
* access MY_CXT.
*/
#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
#define START_MY_CXT
#if PERL_REVISION == 5 && \
(PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 ))
/* Fetches the SV that keeps the per-interpreter data. */
#define dMY_CXT_SV \
SV *my_cxt_sv = perl_get_sv(MY_CXT_KEY, FALSE)
#else /* >= perl5.004_68 */
#define dMY_CXT_SV \
SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \
sizeof(MY_CXT_KEY)-1, TRUE)
#endif /* < perl5.004_68 */
/* This declaration should be used within all functions that use the
* interpreter-local data. */
#define dMY_CXT \
dMY_CXT_SV; \
my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
/* Creates and zeroes the per-interpreter data.
* (We allocate my_cxtp in a Perl SV so that it will be released when
* the interpreter goes away.) */
#define MY_CXT_INIT \
dMY_CXT_SV; \
/* newSV() allocates one more than needed */ \
my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
Zero(my_cxtp, 1, my_cxt_t); \
sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
/* This macro must be used to access members of the my_cxt_t structure.
* e.g. MYCXT.some_data */
#define MY_CXT (*my_cxtp)
/* Judicious use of these macros can reduce the number of times dMY_CXT
* is used. Use is similar to pTHX, aTHX etc. */
#define pMY_CXT my_cxt_t *my_cxtp
#define pMY_CXT_ pMY_CXT,
#define _pMY_CXT ,pMY_CXT
#define aMY_CXT my_cxtp
#define aMY_CXT_ aMY_CXT,
#define _aMY_CXT ,aMY_CXT
#else /* single interpreter */
#ifndef NOOP
# define NOOP (void)0
#endif
#ifdef HASATTRIBUTE
# define PERL_UNUSED_DECL __attribute__((unused))
#else
# define PERL_UNUSED_DECL
#endif
#ifndef dNOOP
# define dNOOP extern int Perl___notused PERL_UNUSED_DECL
#endif
#define START_MY_CXT static my_cxt_t my_cxt;
#define dMY_CXT_SV dNOOP
#define dMY_CXT dNOOP
#define MY_CXT_INIT NOOP
#define MY_CXT my_cxt
#define pMY_CXT void
#define pMY_CXT_
#define _pMY_CXT
#define aMY_CXT
#define aMY_CXT_
#define _aMY_CXT
#endif
#endif /* START_MY_CXT */
#ifndef DBM_setFilter
/*
The DBM_setFilter & DBM_ckFilter macros are only used by
the *DB*_File modules
*/
#define DBM_setFilter(db_type,code) \
{ \
if (db_type) \
RETVAL = sv_mortalcopy(db_type) ; \
ST(0) = RETVAL ; \
if (db_type && (code == &PL_sv_undef)) { \
SvREFCNT_dec(db_type) ; \
db_type = NULL ; \
} \
else if (code) { \
if (db_type) \
sv_setsv(db_type, code) ; \
else \
db_type = newSVsv(code) ; \
} \
}
#define DBM_ckFilter(arg,type,name) \
if (db->type) { \
if (db->filtering) { \
croak("recursion detected in %s", name) ; \
} \
ENTER ; \
SAVETMPS ; \
SAVEINT(db->filtering) ; \
db->filtering = TRUE ; \
SAVESPTR(DEFSV) ; \
DEFSV = arg ; \
SvTEMP_off(arg) ; \
PUSHMARK(SP) ; \
PUTBACK ; \
(void) perl_call_sv(db->type, G_DISCARD); \
SPAGAIN ; \
PUTBACK ; \
FREETMPS ; \
LEAVE ; \
}
#endif /* DBM_setFilter */
#endif /* _P_P_PORTABILITY_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,981 @@
#!./perl
BEGIN {
unless(grep /blib/, @INC) {
chdir 't' if -d 't';
@INC = '../lib' if -d '../lib';
}
}
use warnings;
use strict;
use Config;
BEGIN {
if(-d "lib" && -f "TEST") {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
}
}
}
use DB_File;
use Fcntl;
print "1..143\n";
sub ok
{
my $no = shift ;
my $result = shift ;
print "not " unless $result ;
print "ok $no\n" ;
}
{
package Redirect ;
use Symbol ;
sub new
{
my $class = shift ;
my $filename = shift ;
my $fh = gensym ;
open ($fh, ">$filename") || die "Cannot open $filename: $!" ;
my $real_stdout = select($fh) ;
return bless [$fh, $real_stdout ] ;
}
sub DESTROY
{
my $self = shift ;
close $self->[0] ;
select($self->[1]) ;
}
}
sub docat_del
{
my $file = shift;
local $/ = undef;
open(CAT,$file) || die "Cannot open $file: $!";
my $result = <CAT>;
close(CAT);
$result = normalise($result) ;
unlink $file ;
return $result;
}
sub normalise
{
my $data = shift ;
$data =~ s#\r\n#\n#g
if $^O eq 'cygwin' ;
return $data ;
}
sub safeUntie
{
my $hashref = shift ;
my $no_inner = 1;
local $SIG{__WARN__} = sub {-- $no_inner } ;
untie %$hashref;
return $no_inner;
}
my $Dfile = "dbhash.tmp";
my $Dfile2 = "dbhash2.tmp";
my $null_keys_allowed = ($DB_File::db_ver < 2.004010
|| $DB_File::db_ver >= 3.1 );
unlink $Dfile;
umask(0);
# Check the interface to HASHINFO
my $dbh = new DB_File::HASHINFO ;
ok(1, ! defined $dbh->{bsize}) ;
ok(2, ! defined $dbh->{ffactor}) ;
ok(3, ! defined $dbh->{nelem}) ;
ok(4, ! defined $dbh->{cachesize}) ;
ok(5, ! defined $dbh->{hash}) ;
ok(6, ! defined $dbh->{lorder}) ;
$dbh->{bsize} = 3000 ;
ok(7, $dbh->{bsize} == 3000 );
$dbh->{ffactor} = 9000 ;
ok(8, $dbh->{ffactor} == 9000 );
$dbh->{nelem} = 400 ;
ok(9, $dbh->{nelem} == 400 );
$dbh->{cachesize} = 65 ;
ok(10, $dbh->{cachesize} == 65 );
my $some_sub = sub {} ;
$dbh->{hash} = $some_sub;
ok(11, $dbh->{hash} eq $some_sub );
$dbh->{lorder} = 1234 ;
ok(12, $dbh->{lorder} == 1234 );
# Check that an invalid entry is caught both for store & fetch
eval '$dbh->{fred} = 1234' ;
ok(13, $@ =~ /^DB_File::HASHINFO::STORE - Unknown element 'fred' at/ );
eval 'my $q = $dbh->{fred}' ;
ok(14, $@ =~ /^DB_File::HASHINFO::FETCH - Unknown element 'fred' at/ );
# Now check the interface to HASH
my ($X, %h);
ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
die "Could not tie: $!" unless $X;
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
my %noMode = map { $_, 1} qw( amigaos MSWin32 NetWare cygwin ) ;
ok(16, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640) ||
$noMode{$^O} );
my ($key, $value, $i);
while (($key,$value) = each(%h)) {
$i++;
}
ok(17, !$i );
$h{'goner1'} = 'snork';
$h{'abc'} = 'ABC';
ok(18, $h{'abc'} eq 'ABC' );
ok(19, !defined $h{'jimmy'} );
ok(20, !exists $h{'jimmy'} );
ok(21, exists $h{'abc'} );
$h{'def'} = 'DEF';
$h{'jkl','mno'} = "JKL\034MNO";
$h{'a',2,3,4,5} = join("\034",'A',2,3,4,5);
$h{'a'} = 'A';
#$h{'b'} = 'B';
$X->STORE('b', 'B') ;
$h{'c'} = 'C';
#$h{'d'} = 'D';
$X->put('d', 'D') ;
$h{'e'} = 'E';
$h{'f'} = 'F';
$h{'g'} = 'X';
$h{'h'} = 'H';
$h{'i'} = 'I';
$h{'goner2'} = 'snork';
delete $h{'goner2'};
# IMPORTANT - $X must be undefined before the untie otherwise the
# underlying DB close routine will not get called.
undef $X ;
untie(%h);
# tie to the same file again, do not supply a type - should default to HASH
ok(22, $X = tie(%h,'DB_File',$Dfile, O_RDWR, 0640) );
# Modify an entry from the previous tie
$h{'g'} = 'G';
$h{'j'} = 'J';
$h{'k'} = 'K';
$h{'l'} = 'L';
$h{'m'} = 'M';
$h{'n'} = 'N';
$h{'o'} = 'O';
$h{'p'} = 'P';
$h{'q'} = 'Q';
$h{'r'} = 'R';
$h{'s'} = 'S';
$h{'t'} = 'T';
$h{'u'} = 'U';
$h{'v'} = 'V';
$h{'w'} = 'W';
$h{'x'} = 'X';
$h{'y'} = 'Y';
$h{'z'} = 'Z';
$h{'goner3'} = 'snork';
delete $h{'goner1'};
$X->DELETE('goner3');
my @keys = keys(%h);
my @values = values(%h);
ok(23, $#keys == 29 && $#values == 29) ;
$i = 0 ;
while (($key,$value) = each(%h)) {
if ($key eq $keys[$i] && $value eq $values[$i] && $key eq lc($value)) {
$key =~ y/a-z/A-Z/;
$i++ if $key eq $value;
}
}
ok(24, $i == 30) ;
@keys = ('blurfl', keys(%h), 'dyick');
ok(25, $#keys == 31) ;
$h{'foo'} = '';
ok(26, $h{'foo'} eq '' );
# Berkeley DB from version 2.4.10 to 3.0 does not allow null keys.
# This feature was reenabled in version 3.1 of Berkeley DB.
my $result = 0 ;
if ($null_keys_allowed) {
$h{''} = 'bar';
$result = ( $h{''} eq 'bar' );
}
else
{ $result = 1 }
ok(27, $result) ;
# check cache overflow and numeric keys and contents
my $ok = 1;
for ($i = 1; $i < 200; $i++) { $h{$i + 0} = $i + 0; }
for ($i = 1; $i < 200; $i++) { $ok = 0 unless $h{$i} == $i; }
ok(28, $ok );
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
ok(29, $size > 0 );
@h{0..200} = 200..400;
my @foo = @h{0..200};
ok(30, join(':',200..400) eq join(':',@foo) );
# Now check all the non-tie specific stuff
# Check NOOVERWRITE will make put fail when attempting to overwrite
# an existing record.
my $status = $X->put( 'x', 'newvalue', R_NOOVERWRITE) ;
ok(31, $status == 1 );
# check that the value of the key 'x' has not been changed by the
# previous test
ok(32, $h{'x'} eq 'X' );
# standard put
$status = $X->put('key', 'value') ;
ok(33, $status == 0 );
#check that previous put can be retrieved
$value = 0 ;
$status = $X->get('key', $value) ;
ok(34, $status == 0 );
ok(35, $value eq 'value' );
# Attempting to delete an existing key should work
$status = $X->del('q') ;
ok(36, $status == 0 );
# Make sure that the key deleted, cannot be retrieved
{
no warnings 'uninitialized' ;
ok(37, $h{'q'} eq undef );
}
# Attempting to delete a non-existant key should fail
$status = $X->del('joe') ;
ok(38, $status == 1 );
# Check the get interface
# First a non-existing key
$status = $X->get('aaaa', $value) ;
ok(39, $status == 1 );
# Next an existing key
$status = $X->get('a', $value) ;
ok(40, $status == 0 );
ok(41, $value eq 'A' );
# seq
# ###
# ditto, but use put to replace the key/value pair.
# use seq to walk backwards through a file - check that this reversed is
# check seq FIRST/LAST
# sync
# ####
$status = $X->sync ;
ok(42, $status == 0 );
# fd
# ##
$status = $X->fd ;
ok(43, $status != 0 );
undef $X ;
untie %h ;
unlink $Dfile;
# clear
# #####
ok(44, tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
foreach (1 .. 10)
{ $h{$_} = $_ * 100 }
# check that there are 10 elements in the hash
$i = 0 ;
while (($key,$value) = each(%h)) {
$i++;
}
ok(45, $i == 10);
# now clear the hash
%h = () ;
# check it is empty
$i = 0 ;
while (($key,$value) = each(%h)) {
$i++;
}
ok(46, $i == 0);
untie %h ;
unlink $Dfile ;
# Now try an in memory file
ok(47, $X = tie(%h, 'DB_File',undef, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
# fd with an in memory file should return fail
$status = $X->fd ;
ok(48, $status == -1 );
undef $X ;
untie %h ;
{
# check ability to override the default hashing
my %x ;
my $filename = "xyz" ;
my $hi = new DB_File::HASHINFO ;
$::count = 0 ;
$hi->{hash} = sub { ++$::count ; length $_[0] } ;
ok(49, tie %x, 'DB_File', $filename, O_RDWR|O_CREAT, 0640, $hi ) ;
$h{"abc"} = 123 ;
ok(50, $h{"abc"} == 123) ;
untie %x ;
unlink $filename ;
ok(51, $::count >0) ;
}
{
# check that attempting to tie an array to a DB_HASH will fail
my $filename = "xyz" ;
my @x ;
eval { tie @x, 'DB_File', $filename, O_RDWR|O_CREAT, 0640, $DB_HASH ; } ;
ok(52, $@ =~ /^DB_File can only tie an associative array to a DB_HASH database/) ;
unlink $filename ;
}
{
# sub-class test
package Another ;
use warnings ;
use strict ;
open(FILE, ">SubDB.pm") or die "Cannot open SubDB.pm: $!\n" ;
print FILE <<'EOM' ;
package SubDB ;
use warnings ;
use strict ;
our (@ISA, @EXPORT);
require Exporter ;
use DB_File;
@ISA=qw(DB_File);
@EXPORT = @DB_File::EXPORT ;
sub STORE {
my $self = shift ;
my $key = shift ;
my $value = shift ;
$self->SUPER::STORE($key, $value * 2) ;
}
sub FETCH {
my $self = shift ;
my $key = shift ;
$self->SUPER::FETCH($key) - 1 ;
}
sub put {
my $self = shift ;
my $key = shift ;
my $value = shift ;
$self->SUPER::put($key, $value * 3) ;
}
sub get {
my $self = shift ;
$self->SUPER::get($_[0], $_[1]) ;
$_[1] -= 2 ;
}
sub A_new_method
{
my $self = shift ;
my $key = shift ;
my $value = $self->FETCH($key) ;
return "[[$value]]" ;
}
1 ;
EOM
close FILE ;
BEGIN { push @INC, '.'; }
eval 'use SubDB ; ';
main::ok(53, $@ eq "") ;
my %h ;
my $X ;
eval '
$X = tie(%h, "SubDB","dbhash.tmp", O_RDWR|O_CREAT, 0640, $DB_HASH );
' ;
main::ok(54, $@ eq "") ;
my $ret = eval '$h{"fred"} = 3 ; return $h{"fred"} ' ;
main::ok(55, $@ eq "") ;
main::ok(56, $ret == 5) ;
my $value = 0;
$ret = eval '$X->put("joe", 4) ; $X->get("joe", $value) ; return $value' ;
main::ok(57, $@ eq "") ;
main::ok(58, $ret == 10) ;
$ret = eval ' R_NEXT eq main::R_NEXT ' ;
main::ok(59, $@ eq "" ) ;
main::ok(60, $ret == 1) ;
$ret = eval '$X->A_new_method("joe") ' ;
main::ok(61, $@ eq "") ;
main::ok(62, $ret eq "[[11]]") ;
undef $X;
untie(%h);
unlink "SubDB.pm", "dbhash.tmp" ;
}
{
# DBM Filter tests
use warnings ;
use strict ;
my (%h, $db) ;
my ($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
unlink $Dfile;
sub checkOutput
{
no warnings 'uninitialized';
my($fk, $sk, $fv, $sv) = @_ ;
print "# Fetch Key : expected '$fk' got '$fetch_key'\n"
if $fetch_key ne $fk ;
print "# Fetch Value : expected '$fv' got '$fetch_value'\n"
if $fetch_value ne $fv ;
print "# Store Key : expected '$sk' got '$store_key'\n"
if $store_key ne $sk ;
print "# Store Value : expected '$sv' got '$store_value'\n"
if $store_value ne $sv ;
print "# \$_ : expected 'original' got '$_'\n"
if $_ ne 'original' ;
return
$fetch_key eq $fk && $store_key eq $sk &&
$fetch_value eq $fv && $store_value eq $sv &&
$_ eq 'original' ;
}
ok(63, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
$db->filter_fetch_key (sub { $fetch_key = $_ }) ;
$db->filter_store_key (sub { $store_key = $_ }) ;
$db->filter_fetch_value (sub { $fetch_value = $_}) ;
$db->filter_store_value (sub { $store_value = $_ }) ;
$_ = "original" ;
$h{"fred"} = "joe" ;
# fk sk fv sv
ok(64, checkOutput( "", "fred", "", "joe")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
ok(65, $h{"fred"} eq "joe");
# fk sk fv sv
ok(66, checkOutput( "", "fred", "joe", "")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
my ($k, $v) ;
$k = 'fred';
ok(67, ! $db->seq($k, $v, R_FIRST) ) ;
ok(68, $k eq "fred") ;
ok(69, $v eq "joe") ;
# fk sk fv sv
ok(70, checkOutput( "fred", "fred", "joe", "")) ;
# replace the filters, but remember the previous set
my ($old_fk) = $db->filter_fetch_key
(sub { $_ = uc $_ ; $fetch_key = $_ }) ;
my ($old_sk) = $db->filter_store_key
(sub { $_ = lc $_ ; $store_key = $_ }) ;
my ($old_fv) = $db->filter_fetch_value
(sub { $_ = "[$_]"; $fetch_value = $_ }) ;
my ($old_sv) = $db->filter_store_value
(sub { s/o/x/g; $store_value = $_ }) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
$h{"Fred"} = "Joe" ;
# fk sk fv sv
ok(71, checkOutput( "", "fred", "", "Jxe")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
ok(72, $h{"Fred"} eq "[Jxe]");
# fk sk fv sv
ok(73, checkOutput( "", "fred", "[Jxe]", "")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
$k = 'Fred'; $v ='';
ok(74, ! $db->seq($k, $v, R_FIRST) ) ;
ok(75, $k eq "FRED") ;
ok(76, $v eq "[Jxe]") ;
# fk sk fv sv
ok(77, checkOutput( "FRED", "fred", "[Jxe]", "")) ;
# put the original filters back
$db->filter_fetch_key ($old_fk);
$db->filter_store_key ($old_sk);
$db->filter_fetch_value ($old_fv);
$db->filter_store_value ($old_sv);
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
$h{"fred"} = "joe" ;
ok(78, checkOutput( "", "fred", "", "joe")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
ok(79, $h{"fred"} eq "joe");
ok(80, checkOutput( "", "fred", "joe", "")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
#ok(77, $db->FIRSTKEY() eq "fred") ;
$k = 'fred';
ok(81, ! $db->seq($k, $v, R_FIRST) ) ;
ok(82, $k eq "fred") ;
ok(83, $v eq "joe") ;
# fk sk fv sv
ok(84, checkOutput( "fred", "fred", "joe", "")) ;
# delete the filters
$db->filter_fetch_key (undef);
$db->filter_store_key (undef);
$db->filter_fetch_value (undef);
$db->filter_store_value (undef);
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
$h{"fred"} = "joe" ;
ok(85, checkOutput( "", "", "", "")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
ok(86, $h{"fred"} eq "joe");
ok(87, checkOutput( "", "", "", "")) ;
($fetch_key, $store_key, $fetch_value, $store_value) = ("") x 4 ;
$k = 'fred';
ok(88, ! $db->seq($k, $v, R_FIRST) ) ;
ok(89, $k eq "fred") ;
ok(90, $v eq "joe") ;
ok(91, checkOutput( "", "", "", "")) ;
undef $db ;
untie %h;
unlink $Dfile;
}
{
# DBM Filter with a closure
use warnings ;
use strict ;
my (%h, $db) ;
unlink $Dfile;
ok(92, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
my %result = () ;
sub Closure
{
my ($name) = @_ ;
my $count = 0 ;
my @kept = () ;
return sub { ++$count ;
push @kept, $_ ;
$result{$name} = "$name - $count: [@kept]" ;
}
}
$db->filter_store_key(Closure("store key")) ;
$db->filter_store_value(Closure("store value")) ;
$db->filter_fetch_key(Closure("fetch key")) ;
$db->filter_fetch_value(Closure("fetch value")) ;
$_ = "original" ;
$h{"fred"} = "joe" ;
ok(93, $result{"store key"} eq "store key - 1: [fred]");
ok(94, $result{"store value"} eq "store value - 1: [joe]");
ok(95, ! defined $result{"fetch key"} );
ok(96, ! defined $result{"fetch value"} );
ok(97, $_ eq "original") ;
ok(98, $db->FIRSTKEY() eq "fred") ;
ok(99, $result{"store key"} eq "store key - 1: [fred]");
ok(100, $result{"store value"} eq "store value - 1: [joe]");
ok(101, $result{"fetch key"} eq "fetch key - 1: [fred]");
ok(102, ! defined $result{"fetch value"} );
ok(103, $_ eq "original") ;
$h{"jim"} = "john" ;
ok(104, $result{"store key"} eq "store key - 2: [fred jim]");
ok(105, $result{"store value"} eq "store value - 2: [joe john]");
ok(106, $result{"fetch key"} eq "fetch key - 1: [fred]");
ok(107, ! defined $result{"fetch value"} );
ok(108, $_ eq "original") ;
ok(109, $h{"fred"} eq "joe");
ok(110, $result{"store key"} eq "store key - 3: [fred jim fred]");
ok(111, $result{"store value"} eq "store value - 2: [joe john]");
ok(112, $result{"fetch key"} eq "fetch key - 1: [fred]");
ok(113, $result{"fetch value"} eq "fetch value - 1: [joe]");
ok(114, $_ eq "original") ;
undef $db ;
untie %h;
unlink $Dfile;
}
{
# DBM Filter recursion detection
use warnings ;
use strict ;
my (%h, $db) ;
unlink $Dfile;
ok(115, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
$db->filter_store_key (sub { $_ = $h{$_} }) ;
eval '$h{1} = 1234' ;
ok(116, $@ =~ /^recursion detected in filter_store_key at/ );
undef $db ;
untie %h;
unlink $Dfile;
}
{
# Examples from the POD
my $file = "xyzt" ;
{
my $redirect = new Redirect $file ;
use warnings FATAL => qw(all);
use strict ;
use DB_File ;
our (%h, $k, $v);
unlink "fruit" ;
tie %h, "DB_File", "fruit", O_RDWR|O_CREAT, 0640, $DB_HASH
or die "Cannot open file 'fruit': $!\n";
# Add a few key/value pairs to the file
$h{"apple"} = "red" ;
$h{"orange"} = "orange" ;
$h{"banana"} = "yellow" ;
$h{"tomato"} = "red" ;
# Check for existence of a key
print "Banana Exists\n\n" if $h{"banana"} ;
# Delete a key/value pair.
delete $h{"apple"} ;
# print the contents of the file
while (($k, $v) = each %h)
{ print "$k -> $v\n" }
untie %h ;
unlink "fruit" ;
}
ok(117, docat_del($file) eq <<'EOM') ;
Banana Exists
orange -> orange
tomato -> red
banana -> yellow
EOM
}
{
# Bug ID 20001013.009
#
# test that $hash{KEY} = undef doesn't produce the warning
# Use of uninitialized value in null operation
use warnings ;
use strict ;
use DB_File ;
unlink $Dfile;
my %h ;
my $a = "";
local $SIG{__WARN__} = sub {$a = $_[0]} ;
tie %h, 'DB_File', $Dfile or die "Can't open file: $!\n" ;
$h{ABC} = undef;
ok(118, $a eq "") ;
untie %h ;
unlink $Dfile;
}
{
# test that %hash = () doesn't produce the warning
# Argument "" isn't numeric in entersub
use warnings ;
use strict ;
use DB_File ;
unlink $Dfile;
my %h ;
my $a = "";
local $SIG{__WARN__} = sub {$a = $_[0]} ;
tie %h, 'DB_File', $Dfile or die "Can't open file: $!\n" ;
%h = (); ;
ok(119, $a eq "") ;
untie %h ;
unlink $Dfile;
}
{
# When iterating over a tied hash using "each", the key passed to FETCH
# will be recycled and passed to NEXTKEY. If a Source Filter modifies the
# key in FETCH via a filter_fetch_key method we need to check that the
# modified key doesn't get passed to NEXTKEY.
# Also Test "keys" & "values" while we are at it.
use warnings ;
use strict ;
use DB_File ;
unlink $Dfile;
my $bad_key = 0 ;
my %h = () ;
my $db ;
ok(120, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
$db->filter_fetch_key (sub { $_ =~ s/^Beta_/Alpha_/ if defined $_}) ;
$db->filter_store_key (sub { $bad_key = 1 if /^Beta_/ ; $_ =~ s/^Alpha_/Beta_/}) ;
$h{'Alpha_ABC'} = 2 ;
$h{'Alpha_DEF'} = 5 ;
ok(121, $h{'Alpha_ABC'} == 2);
ok(122, $h{'Alpha_DEF'} == 5);
my ($k, $v) = ("","");
while (($k, $v) = each %h) {}
ok(123, $bad_key == 0);
$bad_key = 0 ;
foreach $k (keys %h) {}
ok(124, $bad_key == 0);
$bad_key = 0 ;
foreach $v (values %h) {}
ok(125, $bad_key == 0);
undef $db ;
untie %h ;
unlink $Dfile;
}
{
# now an error to pass 'hash' a non-code reference
my $dbh = new DB_File::HASHINFO ;
eval { $dbh->{hash} = 2 };
ok(126, $@ =~ /^Key 'hash' not associated with a code reference at/);
}
{
# recursion detection in hash
my %hash ;
unlink $Dfile;
my $dbh = new DB_File::HASHINFO ;
$dbh->{hash} = sub { $hash{3} = 4 ; length $_[0] } ;
my (%h);
ok(127, tie(%hash, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $dbh ) );
eval { $hash{1} = 2;
$hash{4} = 5;
};
ok(128, $@ =~ /^DB_File hash callback: recursion detected/);
{
no warnings;
untie %hash;
}
unlink $Dfile;
}
{
# Check that two hash's don't interact
my %hash1 ;
my %hash2 ;
my $h1_count = 0;
my $h2_count = 0;
unlink $Dfile, $Dfile2;
my $dbh1 = new DB_File::HASHINFO ;
$dbh1->{hash} = sub { ++ $h1_count ; length $_[0] } ;
my $dbh2 = new DB_File::HASHINFO ;
$dbh2->{hash} = sub { ++ $h2_count ; length $_[0] } ;
my (%h);
ok(129, tie(%hash1, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $dbh1 ) );
ok(130, tie(%hash2, 'DB_File',$Dfile2, O_RDWR|O_CREAT, 0640, $dbh2 ) );
$hash1{DEFG} = 5;
$hash1{XYZ} = 2;
$hash1{ABCDE} = 5;
$hash2{defg} = 5;
$hash2{xyz} = 2;
$hash2{abcde} = 5;
ok(131, $h1_count > 0);
ok(132, $h1_count == $h2_count);
ok(133, safeUntie \%hash1);
ok(134, safeUntie \%hash2);
unlink $Dfile, $Dfile2;
}
{
# Passing undef for flags and/or mode when calling tie could cause
# Use of uninitialized value in subroutine entry
my $warn_count = 0 ;
#local $SIG{__WARN__} = sub { ++ $warn_count };
my %hash1;
unlink $Dfile;
tie %hash1, 'DB_File',$Dfile, undef;
ok(135, $warn_count == 0);
$warn_count = 0;
tie %hash1, 'DB_File',$Dfile, O_RDWR|O_CREAT, undef;
ok(136, $warn_count == 0);
tie %hash1, 'DB_File',$Dfile, undef, undef;
ok(137, $warn_count == 0);
$warn_count = 0;
unlink $Dfile;
}
{
# Check that DBM Filter can cope with read-only $_
use warnings ;
use strict ;
my (%h, $db) ;
unlink $Dfile;
ok(138, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
$db->filter_fetch_key (sub { }) ;
$db->filter_store_key (sub { }) ;
$db->filter_fetch_value (sub { }) ;
$db->filter_store_value (sub { }) ;
$_ = "original" ;
$h{"fred"} = "joe" ;
ok(139, $h{"fred"} eq "joe");
eval { grep { $h{$_} } (1, 2, 3) };
ok (140, ! $@);
# delete the filters
$db->filter_fetch_key (undef);
$db->filter_store_key (undef);
$db->filter_fetch_value (undef);
$db->filter_store_value (undef);
$h{"fred"} = "joe" ;
ok(141, $h{"fred"} eq "joe");
ok(142, $db->FIRSTKEY() eq "fred") ;
eval { grep { $h{$_} } (1, 2, 3) };
ok (143, ! $@);
undef $db ;
untie %h;
unlink $Dfile;
}
exit ;

File diff suppressed because it is too large Load Diff

46
bdb/perl/DB_File/typemap Normal file
View File

@ -0,0 +1,46 @@
# typemap for Perl 5 interface to Berkeley
#
# written by Paul Marquess <Paul.Marquess@btinternet.com>
# last modified 10th December 2000
# version 1.74
#
#################################### DB SECTION
#
#
u_int T_U_INT
DB_File T_PTROBJ
DBT T_dbtdatum
DBTKEY T_dbtkeydatum
INPUT
T_dbtkeydatum
DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
DBT_clear($var) ;
if (SvOK($arg)){
if (db->type != DB_RECNO) {
$var.data = SvPV($arg, PL_na);
$var.size = (int)PL_na;
}
else {
Value = GetRecnoKey(aTHX_ db, SvIV($arg)) ;
$var.data = & Value;
$var.size = (int)sizeof(recno_t);
}
}
T_dbtdatum
DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
DBT_clear($var) ;
if (SvOK($arg)) {
$var.data = SvPV($arg, PL_na);
$var.size = (int)PL_na;
}
OUTPUT
T_dbtkeydatum
OutputKey($arg, $var)
T_dbtdatum
OutputValue($arg, $var)
T_PTROBJ
sv_setref_pv($arg, dbtype, (void*)$var);

View File

@ -0,0 +1,82 @@
/*
version.c -- Perl 5 interface to Berkeley DB
written by Paul Marquess <Paul.Marquess@btinternet.com>
last modified 2nd Jan 2002
version 1.802
All comments/suggestions/problems are welcome
Copyright (c) 1995-2002 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Changes:
1.71 - Support for Berkeley DB version 3.
Support for Berkeley DB 2/3's backward compatability mode.
1.72 - No change.
1.73 - Added support for threading
1.74 - Added Perl core patch 7801.
*/
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <db.h>
void
#ifdef CAN_PROTOTYPE
__getBerkeleyDBInfo(void)
#else
__getBerkeleyDBInfo()
#endif
{
#ifdef dTHX
dTHX;
#endif
SV * version_sv = perl_get_sv("DB_File::db_version", GV_ADD|GV_ADDMULTI) ;
SV * ver_sv = perl_get_sv("DB_File::db_ver", GV_ADD|GV_ADDMULTI) ;
SV * compat_sv = perl_get_sv("DB_File::db_185_compat", GV_ADD|GV_ADDMULTI) ;
#ifdef DB_VERSION_MAJOR
int Major, Minor, Patch ;
(void)db_version(&Major, &Minor, &Patch) ;
/* Check that the versions of db.h and libdb.a are the same */
if (Major != DB_VERSION_MAJOR || Minor != DB_VERSION_MINOR
|| Patch != DB_VERSION_PATCH)
croak("\nDB_File needs compatible versions of libdb & db.h\n\tyou have db.h version %d.%d.%d and libdb version %d.%d.%d\n",
DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
Major, Minor, Patch) ;
/* check that libdb is recent enough -- we need 2.3.4 or greater */
if (Major == 2 && (Minor < 3 || (Minor == 3 && Patch < 4)))
croak("DB_File needs Berkeley DB 2.3.4 or greater, you have %d.%d.%d\n",
Major, Minor, Patch) ;
{
char buffer[40] ;
sprintf(buffer, "%d.%d", Major, Minor) ;
sv_setpv(version_sv, buffer) ;
sprintf(buffer, "%d.%03d%03d", Major, Minor, Patch) ;
sv_setpv(ver_sv, buffer) ;
}
#else /* ! DB_VERSION_MAJOR */
sv_setiv(version_sv, 1) ;
sv_setiv(ver_sv, 1) ;
#endif /* ! DB_VERSION_MAJOR */
#ifdef COMPAT185
sv_setiv(compat_sv, 1) ;
#else /* ! COMPAT185 */
sv_setiv(compat_sv, 0) ;
#endif /* ! COMPAT185 */
}