home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: Kevin Stock <kstock@isfrance.encore.fr>
- Subject: v20i097: oraperl - Extensions to Perl to access Oracle databases, Patch01
- Message-ID: <1991Jul16.013851.22199@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 6c5957f6daffe9c75564a59521780b78
- Date: Tue, 16 Jul 1991 01:38:51 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Kevin Stock <kstock@gouldfr.encore.fr>
- Posting-number: Volume 20, Issue 97
- Archive-name: oraperl/patch01
- Patch-To: oraperl: Volume 18, Issue 10
-
- This is a minor patch to Oraperl.
-
- Oraperl is a set of usersubs for Perl which allow scripts to access Oracle
- databases. You need Perl v3.0.27 or later and Oracle Pro*C to build it.
- Oraperl appeared in comp.sources.misc in April 1991 (v18i010).
-
- This very minor patch does the following:
-
- Fixes a bug in Makefile - $(LIBS) was not used
- Adds the file Oracle-v5 - hints for building under Oracle v5
- Changes copyright notices to allow copying under the Artistic License
- Adds network addresses to the manual pages
- Adds a PATCHLEVEL file
- No functional changes
-
- To apply, please unshar this message, which will create the files CHANGES,
- Oracle-v5, PATCHLEVEL and Patch01. Then feed Patch01 into the patch program.
- If you already have a working Oraperl, no recompilation is necessary, though
- if your Oracle is version 5 or earlier, you might want to take a look at
- the file Oracle-v5.
-
- Kevin
-
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 06/10/1991 13:59 UTC by kstock@mmcompta
- # Source directory /usr/local/src/cmd/oraperl
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 324 -rw-r--r-- CHANGES
- # 1598 -rw-r--r-- Oracle-v5
- # 2 -rw-r--r-- PATCHLEVEL
- # 7026 -rw-r--r-- Patch01
- #
- # ============= CHANGES ==============
- if test -f 'CHANGES' -a X"$1" != X"-c"; then
- echo 'x - skipping CHANGES (File already exists)'
- else
- echo 'x - extracting CHANGES (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'CHANGES' &&
- Changes to the Oraperl package.
- X
- Patch 01
- ========
- Fixed a bug in Makefile - $(LIBS) was not used
- Added the file Oracle-v5 - hints for building under Oracle v5
- Changed copyright notices to allow copying under Larry's Artistic License
- Added network addresses to the manual pages
- Added a PATCHLEVEL file
- No functional changes
- SHAR_EOF
- chmod 0644 CHANGES ||
- echo 'restore of CHANGES failed'
- Wc_c="`wc -c < 'CHANGES'`"
- test 324 -eq "$Wc_c" ||
- echo 'CHANGES: original size 324, current size' "$Wc_c"
- fi
- # ============= Oracle-v5 ==============
- if test -f 'Oracle-v5' -a X"$1" != X"-c"; then
- echo 'x - skipping Oracle-v5 (File already exists)'
- else
- echo 'x - extracting Oracle-v5 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Oracle-v5' &&
- The Makefile includes library definitions which are suitable for Oracle v6
- on an Encore Multimax running UMAX V. I do not have access to any other
- configuration to test Oraperl.
- X
- Oraperl just links to the Oracle Pro*C libraries in the same way as any
- other Pro*C program, so give it the same libraries as you would give one
- of your own programs. See your Pro*C manual or example programs for details.
- X
- However, two people sent me their modified Makefiles for Oracle v5. Since
- they are different in effect, not only in presentation, I assume that the
- directory structure of Oracle varies between systems. The two setups I was
- sent are reproduced below. Maybe one of them will be suitable for your
- system if mine isn't.
- X
- First method - this assumes that the libraries live under $ORACLE_HOME/c/libs
- and $ORACLE_HOME/rdbms/libs, as well as requiring an additional .o file.
- X
- > ORALIBS = -locic -loracle -lupi -losd -losn -loracle \
- > $(ORACLE_HOME)/rdbms/libs/osntab.o -lutt -losd -losn -lclib0
- >
- > LDFLAGS = -L$(ORACLE_HOME)/c/libs -L$(ORACLE_HOME)/rdbms/libs
- >
- > oraperl: $(SRC)/uperl.o usersub.o oracle.o orafns.o getcursor.o
- > $(CC) -o oraperl $(LDFLAGS) $(SRC)/uperl.o usersub.o oracle.o orafns.o \
- > getcursor.o $(ORALIBS) $(LIBS)
- X
- Second method - much simpler. Only seems to require the first two libraries
- (libocic and liboracle) of the previous method, but this time they live under
- $ORACLE_HOME/pro.
- X
- > OTHERLIBS =
- > CLIBS = $(OTHERLIBS)
- > OCILIB = $(ORACLE_HOME)/pro/libocic.a
- > NETLIBS =
- > ORALIBS = $(ORACLE_HOME)/pro/liboracle.a
- X
- Thanks to Mark Adams and Norman Frech for their help.
- SHAR_EOF
- chmod 0644 Oracle-v5 ||
- echo 'restore of Oracle-v5 failed'
- Wc_c="`wc -c < 'Oracle-v5'`"
- test 1598 -eq "$Wc_c" ||
- echo 'Oracle-v5: original size 1598, current size' "$Wc_c"
- fi
- # ============= PATCHLEVEL ==============
- if test -f 'PATCHLEVEL' -a X"$1" != X"-c"; then
- echo 'x - skipping PATCHLEVEL (File already exists)'
- else
- echo 'x - extracting PATCHLEVEL (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'PATCHLEVEL' &&
- 1
- SHAR_EOF
- chmod 0644 PATCHLEVEL ||
- echo 'restore of PATCHLEVEL failed'
- Wc_c="`wc -c < 'PATCHLEVEL'`"
- test 2 -eq "$Wc_c" ||
- echo 'PATCHLEVEL: original size 2, current size' "$Wc_c"
- fi
- # ============= Patch01 ==============
- if test -f 'Patch01' -a X"$1" != X"-c"; then
- echo 'x - skipping Patch01 (File already exists)'
- else
- echo 'x - extracting Patch01 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Patch01' &&
- *** OLD/Makefile Mon Jun 10 15:55:56 1991
- --- ./Makefile Mon Jun 10 12:15:55 1991
- ***************
- *** 3,9 ****
- X # Change these to your ORACLE installation directory and Perl source directory
- X
- X ORACLE_HOME = /usr/soft/oracle
- ! SRC = /usr/soft/public/perl4/src
- X
- X # Oracle Definitions, taken from proc.mk
- X
- --- 3,9 ----
- X # Change these to your ORACLE installation directory and Perl source directory
- X
- X ORACLE_HOME = /usr/soft/oracle
- ! SRC = /usr/soft/public/perl_4.0.09
- X
- X # Oracle Definitions, taken from proc.mk
- X
- ***************
- *** 18,24 ****
- X
- X GLOBINCS =
- X LOCINCS =
- ! LIBS =
- X
- X # Oraperl Definitions
- X
- --- 18,24 ----
- X
- X GLOBINCS =
- X LOCINCS =
- ! LIBS = -lnsl_s -lsocket -ldbm -lmalloc -lm
- X
- X # Oraperl Definitions
- X
- ***************
- *** 29,35 ****
- X
- X oraperl: $(SRC)/uperl.o usersub.o oracle.o orafns.o getcursor.o
- X cc -o oraperl $(SRC)/uperl.o usersub.o oracle.o orafns.o getcursor.o \
- ! -lm $(OCILIB) $(NETLIBS) $(ORALIBS) $(CLIBS)
- X
- X oracle.c: $(SRC)/usub/mus oracle.mus
- X $(SRC)/usub/mus oracle.mus >oracle.c
- --- 29,35 ----
- X
- X oraperl: $(SRC)/uperl.o usersub.o oracle.o orafns.o getcursor.o
- X cc -o oraperl $(SRC)/uperl.o usersub.o oracle.o orafns.o getcursor.o \
- ! -lm $(OCILIB) $(NETLIBS) $(ORALIBS) $(CLIBS) $(LIBS)
- X
- X oracle.c: $(SRC)/usub/mus oracle.mus
- X $(SRC)/usub/mus oracle.mus >oracle.c
- *** OLD/README Mon Jun 10 15:55:55 1991
- --- ./README Mon Jun 10 15:44:49 1991
- ***************
- *** 20,31 ****
- X see orafns.h for an explanation
- X
- X If your version of Perl is earlier than v4, you will also need to make
- ! one change to oracle.mus . The name str_2mortal() on line 100 must
- X be changed to str_2static() with the same arguments.
- X
- X I've only tested this on an Encore Multimax 520 running UMAX V (Sys Vr3.2),
- ! using Perl 3.0.34 and 4.0.00 with Oracle version 6, as I don't have access
- ! to any other system with Pro*C. I'd appreciate any comments, bug-reports etc.
- X
- X In addition to this README, the package contains the following files:
- X
- --- 20,32 ----
- X see orafns.h for an explanation
- X
- X If your version of Perl is earlier than v4, you will also need to make
- ! one change to oracle.mus . The name str_2mortal() on line 101 must
- X be changed to str_2static() with the same arguments.
- X
- X I've only tested this on an Encore Multimax 520 running UMAX V (Sys Vr3.2),
- ! using Perl 3.0.34, 4.0.00 4.0.03 and 4.0.09 with Oracle version 6, as I don't
- ! have access to any other system with Pro*C. I'd appreciate any comments,
- ! bug-reports etc.
- X
- X In addition to this README, the package contains the following files:
- X
- ***************
- *** 45,50 ****
- --- 46,52 ----
- X oraperl.doc explains some of the thinking behind Oraperl
- X oraperl.ref quick reference (troff format)
- X oraperl.1 manual page
- + Oracle-v5 Hints for compiling Oraperl with Oracle v5
- X
- X Many thanks to Larry for Perl. Now if only we could get the Camel book
- X into France! Hmm. Any plans for "Le Livre Chameau"?
- *** OLD/getcursor.c Mon Jun 10 15:55:58 1991
- --- ./getcursor.c Mon Jun 10 15:48:32 1991
- ***************
- *** 5,11 ****
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * a copy of which should have accompanied your Perl kit.
- X */
- X
- X #include "EXTERN.h"
- --- 5,12 ----
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * or the Artistic License, copies of which should have accompanied your
- ! * Perl kit.
- X */
- X
- X #include "EXTERN.h"
- *** OLD/oracle.mus Mon Jun 10 15:55:59 1991
- --- ./oracle.mus Mon Jun 10 15:48:50 1991
- ***************
- *** 5,11 ****
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * a copy of which should have accompanied your Perl kit.
- X */
- X
- X #include "EXTERN.h"
- --- 5,12 ----
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * or the Artistic License, copies of which should have accompanied your
- ! * Perl kit.
- X */
- X
- X #include "EXTERN.h"
- *** OLD/orafns.c Mon Jun 10 15:56:00 1991
- --- ./orafns.c Mon Jun 10 15:48:35 1991
- ***************
- *** 5,11 ****
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * a copy of which should have accompanied your Perl kit.
- X */
- X
- X #include "INTERN.h"
- --- 5,12 ----
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * or the Artistic License, copies of which should have accompanied your
- ! * Perl kit.
- X */
- X
- X #include "INTERN.h"
- *** OLD/orafns.h Mon Jun 10 15:56:01 1991
- --- ./orafns.h Mon Jun 10 15:49:14 1991
- ***************
- *** 5,11 ****
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * a copy of which should have accompanied your Perl kit.
- X */
- X
- X
- --- 5,12 ----
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * or the Artistic License, copies of which should have accompanied your
- ! * Perl kit.
- X */
- X
- X
- *** OLD/oraperl.1 Mon Jun 10 15:56:02 1991
- --- ./oraperl.1 Mon Jun 10 15:14:35 1991
- ***************
- *** 112,118 ****
- X a further variable, \fIora_debug\fP is available.
- X Setting this variable sets the level of debugging required.
- X If \fIPerl\fP's own runtime debugging is included,
- ! this variable is initialised from the \fB-D\fP option.
- X It may be set from within an \fIOraperl\fP script by normal assignment.
- X
- X .ne 6
- --- 112,118 ----
- X a further variable, \fIora_debug\fP is available.
- X Setting this variable sets the level of debugging required.
- X If \fIPerl\fP's own runtime debugging is included,
- ! this variable is initialised from the \fB\-D\fP option.
- X It may be set from within an \fIOraperl\fP script by normal assignment.
- X
- X .ne 6
- ***************
- *** 148,153 ****
- X .SH AUTHOR
- X \fIORACLE\fP by Oracle Corporation, California.
- X .br
- ! \fIPerl\fP by Larry Wall, Jet Propulsion Laboratory, NASA.
- X .br
- ! \fIOraperl\fP by Kevin Stock, Encore Computer SA, France.
- --- 148,155 ----
- X .SH AUTHOR
- X \fIORACLE\fP by Oracle Corporation, California.
- X .br
- ! \fIPerl\fP by Larry Wall, Netlabs
- ! (\f(CWlwall@netlabs.com\fP, \f(CWlwall@netlabs.com\fP).
- X .br
- ! \fIOraperl\fP by Kevin Stock, Encore Computer SA, France
- ! (\f(CWkstock@gouldfr.encore.fr\fP).
- *** OLD/usersub.c Mon Jun 10 15:56:04 1991
- --- ./usersub.c Mon Jun 10 15:48:37 1991
- ***************
- *** 5,11 ****
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * a copy of which should have accompanied your Perl kit.
- X */
- X
- X #include "EXTERN.h"
- --- 5,12 ----
- X /* Copyright 1991 Kevin Stock.
- X *
- X * You may copy this under the terms of the GNU General Public License,
- ! * or the Artistic License, copies of which should have accompanied your
- ! * Perl kit.
- X */
- X
- X #include "EXTERN.h"
- SHAR_EOF
- chmod 0644 Patch01 ||
- echo 'restore of Patch01 failed'
- Wc_c="`wc -c < 'Patch01'`"
- test 7026 -eq "$Wc_c" ||
- echo 'Patch01: original size 7026, current size' "$Wc_c"
- fi
- exit 0
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-