Skip to content

Commit c2b39c0

Browse files
committed
Fixes to make files, doc updates and misc other minor fixes.
1 parent 0a4e255 commit c2b39c0

File tree

17 files changed

+183
-36
lines changed

17 files changed

+183
-36
lines changed

quickstart/classic/sample_code/common/portable_thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
#ifndef _TT_THREAD_H_
10-
#define _TT_THREAD_H__
10+
#define _TT_THREAD_H_
1111

1212
/* OS-specific header files */
1313

quickstart/classic/sample_code/jdbc/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ To compile the sample programs all at once:
5050

5151
`javac *.java`
5252

53+
**NOTE:** Since XLA does not support applications linked with a driver manager library or the client/server library, the asyncJMS and syncJMS demos cannot be compiled or run in client-only installations.
54+
5355
## How to run the sample JDBC programs
5456

55-
NOTE: On platforms where both the 32-bit and 64-bit JDKs are installed in
57+
**NOTE:** On platforms where both the 32-bit and 64-bit JDKs are installed in
5658
the same directory (e.g. Solaris), java must be invoked with the -d64
5759
option in order to run the 64-bit JVM.
5860

59-
NOTE: Since XLA does not support applications linked with a driver manager
60-
library or the client/server library, the asyncJMS and syncJMS demos cannot
61-
be run in client-only installations.
61+
**NOTE:** On some platforms, such as macOS, you may need to explicitly pass a setting for java.library path tp the JVM in order to run the samples. For example:
62+
63+
java -Djava.library.path=${TIMESTEN_HOME}/install/lib <progname>
6264

6365
**asyncJMS**
6466

quickstart/classic/sample_code/oci/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
4040

4141
## How to compile the sample OCI programs
4242

43-
To compile the sample programs in the sample_code/oci directory, you simply run the makefile supplied in the same directory. Note that the appropriate makefile is made available based on the platform of your TimesTen installation.
43+
To compile the sample programs in the sample_code/oci directory you use a provided makefile.
4444

4545
Firstly, select the platform specific Makefile and copy from quickstart/classic/sample\_code/oci/makefiles to the upper level directory.
4646

quickstart/classic/sample_code/odbc/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
4242

4343
## How to compile the sample ODBC programs
4444

45-
To compile the sample programs in the sample_code/odbc directory, you simply run the makefile supplied in the same directory. Note that the appropriate makefile is made available based on the platform of your TimesTen installation.
45+
To compile the sample programs in the sample_code/odbc directory you use a provided makefile.
4646

4747
Firstly, select the platform specific Makefile and copy from quickstart/classic/sample\_code/odbc/makefiles to the upper level directory.
4848

@@ -68,7 +68,9 @@ Linux/Unix
6868

6969
`make bulkinsert`
7070

71-
There are two versions of each program; one for direct mode and tptbmCS for client-server mode.
71+
There are two versions of each program; *progname* for direct mode and *progname****CS*** for client-server mode.
72+
73+
**NOTE:** The XLA sample programs cannot be compiled or run using a client-only instance.
7274

7375
## How to run the sample ODBC programs
7476

quickstart/classic/sample_code/odbc/bulkinsert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ main(int argc, char **argv)
392392
"turning off auto commit",
393393
__FILE__, __LINE__);
394394

395-
printf("Loading %d records with batch size %lud, commit interval %d\n", records, batchsize, commitsize);
395+
printf("Loading %d records with batch size %lu, commit interval %d\n", records, batchsize, commitsize);
396396

397397
indexTime = 0.0;
398398
if (indexcount && indexbefore) {

quickstart/classic/sample_code/odbc_drivermgr/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
44

55
This directory contains the source code for a TimesTen specific Driver Manager. This can be used to enable C/ODBC programs to simultaneously use boith direct mode and client/server connections to a TimesTen database (which is not possible without a Driver Manager).
66

7-
The sample Driver Manager is focussed on optimal performance while still allowign full access to all TimesTen features. For more information and build instructions see the [User Guide](./TTDMUserGuide.md).
7+
The sample Driver Manager is focussed on optimal performance while still allowing full access to all TimesTen features. For more information and build instructions see the [User Guide](./TTDMUserGuide.md).
8+
9+
**NOTE:** TTDM only supports a limited number of platforms.
810

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
#
2+
# Build TimesTen Sample Programs (Unix)
3+
# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
4+
#
5+
# $Revision
6+
#
7+
8+
#
9+
# Precompilation of plsqlPROC.pc requires that the environment variable
10+
# TWO_TASK is set. The syntax for setting environment variables varies
11+
# depending on which type of shell is used. This make file uses Bourne shell.
12+
#
13+
SHELL=/bin/sh
14+
15+
TT_MVL_LINUX = 0
16+
17+
INSTDIR = $(TIMESTEN_HOME)/install
18+
COMMDIR = $(QUICKSTART_HOME)/sample_code/common
19+
TTORACLE_HOME = $(INSTDIR)/ttoracle_home/instantclient_11_2
20+
OCIINCS = $(TTORACLE_HOME)/sdk/include
21+
22+
CC = gcc
23+
24+
PLATCFLAGS = -Os -finline-functions
25+
LDFLAGS =
26+
27+
EXTRALIBS = -lpthread -lm -lrt
28+
29+
ifeq ($(TT_MVL_LINUX),1)
30+
EXTRALIBS += -ldl -lnsl -lnnz11
31+
endif
32+
33+
INCS = -I$(INSTDIR)/include -I$(COMMDIR) -I$(OCIINCS)
34+
35+
CSDEFS = -DTTCLIENTSERVER
36+
CFLAGS = $(PLATDEFS) $(PLATCFLAGS) $(INCS)
37+
38+
TTLINK = -L$(INSTDIR)/lib -L$(TTORACLE_HOME) -Wl,-rpath,$(INSTDIR)/lib
39+
40+
ICLIBS = $(TTLINK) -lclntsh $(EXTRALIBS)
41+
42+
ANSIDYN1 = ansidyn1
43+
ANSIDYN1OBJS = ansidyn1.o psswds.o parseargs.o
44+
ADDEMPPROC = addempPROC
45+
ADDEMPPROCOBJS = addempPROC.o psswds.o parseargs.o
46+
BATCHFETCHPROC = batchfetchPROC
47+
BATCHFETCHPROCOBJS = batchfetchPROC.o psswds.o parseargs.o
48+
CURSORPROC = cursorPROC
49+
CURSORPROCOBJS = cursorPROC.o psswds.o parseargs.o
50+
GETEMPPROC = getempPROC
51+
GETEMPPROCOBJS = getempPROC.o psswds.o parseargs.o
52+
PLSQLPROC = plsqlPROC
53+
PLSQLPROCOBJS = plsqlPROC.o psswds.o parseargs.o
54+
55+
PROGS = $(ANSIDYN1) $(ADDEMPPROC) $(BATCHFETCHPROC) $(CURSORPROC) \
56+
$(GETEMPPROC) $(PLSQLPROC)
57+
C_FILES = ansidyn1.c addempPROC.c batchfetchPROC.c cursorPROC.c \
58+
getempPROC.c plsqlPROC.c
59+
60+
#
61+
# Top level targets
62+
#
63+
64+
all: $(PROGS)
65+
66+
clean:
67+
rm -f $(PROGS) *.o *.lis $(C_FILES)
68+
69+
70+
#
71+
# Targets for building executables
72+
#
73+
74+
$(ANSIDYN1): $(ANSIDYN1OBJS)
75+
$(CC) -o $@ $(LDFLAGS) $(ANSIDYN1OBJS) $(ICLIBS)
76+
77+
$(ADDEMPPROC): $(ADDEMPPROCOBJS)
78+
$(CC) -o $@ $(LDFLAGS) $(ADDEMPPROCOBJS) $(ICLIBS)
79+
80+
$(BATCHFETCHPROC): $(BATCHFETCHPROCOBJS)
81+
$(CC) -o $@ $(LDFLAGS) $(BATCHFETCHPROCOBJS) $(ICLIBS)
82+
83+
$(CURSORPROC): $(CURSORPROCOBJS)
84+
$(CC) -o $@ $(LDFLAGS) $(CURSORPROCOBJS) $(ICLIBS)
85+
86+
$(GETEMPPROC): $(GETEMPPROCOBJS)
87+
$(CC) -o $@ $(LDFLAGS) $(GETEMPPROCOBJS) $(ICLIBS)
88+
89+
$(PLSQLPROC): $(PLSQLPROCOBJS)
90+
$(CC) -o $@ $(LDFLAGS) $(PLSQLPROCOBJS) $(ICLIBS)
91+
92+
93+
#
94+
# Target for building object files
95+
#
96+
97+
.c.o:
98+
$(CC) $(CFLAGS) -o $@ -c $<
99+
100+
101+
#
102+
# Targets for Oracle Pro*C Pre-compilation
103+
#
104+
105+
ansidyn1.c: ansidyn1.pc
106+
@proc include=$(COMMDIR) iname=ansidyn1.pc config=pcscfg.cfg mode=ansi
107+
108+
addempPROC.c: addempPROC.pc
109+
@proc include=$(COMMDIR) iname=addempPROC.pc config=pcscfg.cfg
110+
111+
batchfetchPROC.c: batchfetchPROC.pc
112+
@proc include=$(COMMDIR) iname=batchfetchPROC.pc config=pcscfg.cfg
113+
114+
cursorPROC.c: cursorPROC.pc
115+
@proc include=$(COMMDIR) iname=cursorPROC.pc config=pcscfg.cfg
116+
117+
getempPROC.c: getempPROC.pc
118+
@proc include=$(COMMDIR) iname=getempPROC.pc config=pcscfg.cfg
119+
120+
plsqlPROC.c: plsqlPROC.pc
121+
ifeq ($(TT_MVL_LINUX),1)
122+
@TWO_TASK=sampledb;export TWO_TASK;LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) proc include=$(COMMDIR) USERID=appuser iname=plsqlPROC.pc config=pcscfg.cfg sqlcheck=semantics
123+
else
124+
@TWO_TASK=sampledb;export TWO_TASK;proc include=$(COMMDIR) USERID=appuser iname=plsqlPROC.pc config=pcscfg.cfg sqlcheck=semantics
125+
endif
126+

quickstart/classic/sample_code/proc/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
4040

4141
## How to compile the sample Pro*C programs
4242

43-
To compile the sample programs in the sample\_code/proc directory, you simply run the makefile supplied in the same directory. Note that the appropriate makefile is made available based on the platform of your TimesTen installation.
43+
To compile the sample programs in the sample_code/proc directory you use a provided makefile and configuration file.
4444

45-
Firstly, select the platform specific Makefile and copy from _quickstart/classic/sample\_code/proc/makefiles_ to the upper level directory.
45+
Firstly, select the platform specific Makefile and configuration file and copy these from quickstart/classic/sample\_code/proc/makefiles to the upper level directory.
4646

4747
For example, if your platform is Linux x86-64bit, execute the following commands:
4848

49-
`cd quickstart/classic/sample_code/proc/makefiles`
49+
`cd quickstart/classic/sample\_code/proc/makefiles`
5050

5151
`cp Makefile.linux8664.proto ../Makefile`
5252

53+
`cp pcscfg.linux8664.proto ../pcscfg.cfg`
54+
5355
`cd ..`
5456

5557
To build a sample program in the sample_code/proc directory, use the following command:

quickstart/classic/sample_code/proc/makefiles/Makefile.macos64.proto

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,14 @@ OCIINCS = $(TTORACLE_HOME)/sdk/include
2020
CC = gcc
2121

2222
PLATCFLAGS = -Os
23-
LDFLAGS = -Wl,-rpath -Wl,$(INSTDIR)/lib -Wl,-rpath -Wl,$(TTORACLE_HOME)
23+
#LDFLAGS = -Wl,-rpath -Wl,$(INSTDIR)/lib -Wl,-rpath -Wl,$(TTORACLE_HOME)
2424

25-
26-
EXTRALIBS = -lpthread -lm -lrt
27-
28-
ifeq ($(TT_MVL_LINUX),1)
29-
EXTRALIBS += -ldl -lnsl -lnnz11
30-
endif
25+
#EXTRALIBS = -lpthread -lm -lrt
3126

3227
INCS = -I$(INSTDIR)/include -I$(COMMDIR) -I$(OCIINCS)
3328

3429
CSDEFS = -DTTCLIENTSERVER
35-
CFLAGS = $(PLATDEFS) $(PLATCFLAGS) $(INCS)
30+
CFLAGS = $(PLATDEFS) $(PLATCFLAGS) $(INCS) -Wno-implicit-int
3631

3732
TTLINK = -L$(INSTDIR)/lib -L$(TTORACLE_HOME)
3833

@@ -118,9 +113,5 @@ getempPROC.c: getempPROC.pc
118113
@proc include=$(COMMDIR) iname=getempPROC.pc config=pcscfg.cfg
119114

120115
plsqlPROC.c: plsqlPROC.pc
121-
ifeq ($(TT_MVL_LINUX),1)
122-
@TWO_TASK=sampledbCS;export TWO_TASK;LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) proc include=$(COMMDIR) USERID=appuser iname=plsqlPROC.pc config=pcscfg.cfg sqlcheck=semantics
123-
else
124116
@TWO_TASK=sampledbCS;export TWO_TASK;proc include=$(COMMDIR) USERID=appuser iname=plsqlPROC.pc config=pcscfg.cfg sqlcheck=semantics
125-
endif
126117

quickstart/classic/sample_code/proc/makefiles/pcscfg.aix64.proto

Whitespace-only changes.

0 commit comments

Comments
 (0)