
Operating System Dependencies
Some details of OCI programming vary from system to system. For convenience, this appendix collects all references in this guide to system-dependent information.
Chapter 1
Compiler and Linking
Oracle Corporation supplies runtime libraries for most popular third-party compilers. The details of linking an OCI program vary from system to system. See the Oracle system-specific documentation for your system for information on supported compilers on your platform and how to link your OCI application.
Chapter 2
Host Data Area (HDA)
The HDA is 256 bytes long on 32-bit systems only. On 64-bit systems the HDA is typically 512 bytes long. If your system is of a different size, check your Oracle system-specific documentation for the correct size of the HDA.
Many OCI programs, including the demos and sample code in this manual, have defined the HDA as a block of 256 one-byte integers (e.g., ub1[256] in C). On some platforms this may cause errors or unpredictable behavior as a result of the integers in the data block not being properly aligned. If your system automatically aligns four-byte integers, you can eliminate the problem by defining the HDA as a block of 64 four-byte integers (e.g., ub4[64] in C).
Logon Data Area (LDA)
The layout, field lengths, and byte offsets of the logon data area are hardware and operating-system dependent. C programmers should use the definition of the LDA listed
(and available online in the header file ocidfn.h). COBOL and FORTRAN programmers must check the Oracle installation and user's guide for your system for a description of the size of the LDA and the offsets of fields in the LDA.
Cursor Data Area (CDA)
The size of the cursor data area and the layout, field lengths, and byte offsets are hardware and operating-system dependent. The cursor data area is at least 64 bytes in size, but check the Oracle installation or user's guide for your system to see the exact size and configuration of the cursor data area. C programmers should use the definition of the CDA listed
(and available online in the header file ocidfn.h). COBOL and FORTRAN programmers must check the Oracle installation and user's guide for your system for a description of the size of the CDA and the offsets of fields in the CDA.
The ROWID field in the cursor data area can differ in size from system to system. This depends on the way that internal fields in a C structure are aligned. On systems that align all fields on byte boundaries, the ROWID field is 13 bytes long. On systems that align fields on different boundaries, the ROWID field can be 16 or more bytes long. Check your Oracle installation or user's guide for the exact length on your system.
Internal ROWID
The length of the ROWID field is system dependent. C programmers should see the listing of the CDA structure
. Using the sizeof operator on the ROWID substructure returns the correct length of ROWID, which can differ due to different alignment practices from one C compiler to another. COBOL and FORTRAN programmers should see your Oracle installation or user's guide for the length of ROWID on your system.
Deferred Mode Linking
Deferred mode linking is the default. The link time option that you use to select non-deferred mode linking is system dependent. Refer to the Oracle installation or user's guide for your operating system for further information on how to select non-deferred mode linking.
Thread Safety
Thread safety is not available on all platforms. Check your Oracle installation or user's guide for your platform to determine if you can use thread safety.
Chapter 4
Data Structures
In the example code in this section, the lda_def and cda_def types, as defined in the header file ocidfn.h, are used to declare LDAs and CDAs. See page A - 8 for a listing of the ocidfn.h file. This file is available on line; see the Oracle installation or user's guide for your system for further information on the location of this file.
olog() function
See the section on SQL*Net in the installation or user's guide for your operating system for any particular notes or restrictions that apply to your operating system.
Chapter 5
Data Structures
The size and offsets of members of the logon data area and cursor data area are system dependent. The Oracle installation and user's guide for your system describes them.
The size of the ROWID part of the CDA is system dependent.
OLOG Routine
You should refer to the section on SQL*Net in the Oracle installation or user's guide for your operating system for any particular notes or restrictions that apply to your operating system.
Chapter 6
Data Structures
The size and offsets of members of the logon data area and cursor data area are system dependent. The Oracle installation and user's guide for your system describes them.
The size of the ROWID part of the CDA is system dependent.
OLOG Routine
You should refer to the section on SQL*Net in the Oracle installation or user's guide for your operating system for any particular notes or restrictions that apply to your operating system.
Appendix A, B, C
File Locations
Each of the sample files in Appendix A, B, and C are available online. The exact name and storage location of these programs is system dependent. See your Oracle installation or user's guide for details.