Skip to content

Commit

Permalink
Do not try to compile with SYSASM SYSBKP etc if Oracle version < 12
Browse files Browse the repository at this point in the history
resolves #47
  • Loading branch information
maxsatula committed Dec 30, 2024
1 parent ad19558 commit d793baa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions m4/ax_lib_oracle_oci.m4
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes" -a \
-n "$oracle_version_req"; then
oracle_version_major=`cat $oracle_include_dir/oci.h \
oracle_version_major=`cat $oracle_include_dir/oci*.h \
| grep '#define.*OCI_MAJOR_VERSION.*' \
| sed -e 's/#define OCI_MAJOR_VERSION *//' \
| sed -e 's/ *\/\*.*\*\///'`
oracle_version_minor=`cat $oracle_include_dir/oci.h \
oracle_version_minor=`cat $oracle_include_dir/oci*.h \
| grep '#define.*OCI_MINOR_VERSION.*' \
| sed -e 's/#define OCI_MINOR_VERSION *//' \
| sed -e 's/ *\/\*.*\*\///'`
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,13 @@ int main(int argc, const char *argv[])
{ "rm", '\0', POPT_ARG_NONE, 0, ACTION_RM, "Remove file from Oracle directory" },
{ "sysdba", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSDBA, "Connect as SYSDBA" },
{ "sysoper", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSOPER, "Connect as SYSOPER" },
#if OCI_MAJOR_VERSION >= 12
{ "sysasm", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSASM, "Connect as SYSASM" },
{ "sysbkp", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSBKP, "Connect as SYSBKP" },
{ "sysdgd", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSDGD, "Connect as SYSDGD" },
{ "syskmt", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSKMT, "Connect as SYSKMT" },
{ "sysrac", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSRAC, "Connect as SYSRAC" },
#endif
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, transferModeOptions, 0, "Transfer options:" },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, compressionOptions, 0, "Compression options:" },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, lsOptions, 0, "File list options:" },
Expand Down

0 comments on commit d793baa

Please sign in to comment.