Re: Problem with PROC and <changed> include files without an extension

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 12 May 1999 10:43:19 GMT
Message-ID: <37395a5e.2326465_at_192.86.155.100>


A copy of this was sent to jepollock_at_my-dejanews.com (if that email address didn't require changing) On Wed, 12 May 1999 00:27:03 GMT, you wrote:

>I've had this argument with Ascend level 2 support
>and now with Oracle support. My problem is that the
>Oracle PRO*C Precompiler spews an error on the following
>line:
>
>#include <algorithm>
>but it doesn't spew on:
>#include <algorithm.h>
>nor does it spew on
>#include <map>
>nor
>#include <map.h>
>
>Now this wouldn't be a problem, except that algorithm
>is defined in ANSI C++ as a STL header file. Of course
>they are quoting the documentation that states:
>
>"When you use the preprocessor include directive
>you must include the filename extension (such as .h)"
>
>However, this doesn't say that a file MUST have an
>extension, and this is actually contrary to what I
>believe the ANSI standard states.
>
>So, who do I report this bug to, is anyone else seeing
>this, and why is Oracle support so pig-headed?
>

I filed bug 753504 myself a while ago. Its still open and being worked on. It is this issue all together. Part of the text of the bug is:

If I code:
.
#include <test_hdr>
main( argc, argv )
int argc;
char * argv[];
{

    printf( "The define ONE = %d\n", ONE ); }
.
and simply run: proc t2.pc
.
you will recieve:
Pro*C/C++: Release 8.0.3.0.0 - Production on Mon Oct 26 13:51:3 1998 (c) Copyright 1997 Oracle Corporation. All rights reserved. System default option values taken from: /usr/oracle/oracle8/precomp/admin/pcsg Error at line 1, column 10 in file t2.pc #include <test_hdr>
.........1
PCC-S-02015, unable to open include file .
However, if you code:
#include "test_hdr"
main( argc, argv )
int argc;
char * argv[];
{

    printf( "The define ONE = %d\n", ONE ); }
.
(only changed <test_hdr> into "test_hdr") it will find the file. If I create  a symbolic link "test_hdr.h -> test_hdr" then <test_hdr.h> works. .
Briefly, if you include a file using <> then proc assumes a .h extension if none is provided. This breaks some applications that include files with no extentions.
.
workaround is to use parse=none if you can....

............................................


>I would have been much nicer about this, but this
>has been going on for a couple of weeks now. I don't
>appreciate being told that I'm stupid.
>

your not, its a bug. Its still open. They have confused the EXEC SQL INCLUDE directive (which is documented as appending a .h if there is no file extension) with the C directive #include.

>Jason Pollock
>
>
>--== Sent via Deja.com http://www.deja.com/ ==--
>---Share what you know. Learn what you don't.---

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

-- 
Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Wed May 12 1999 - 12:43:19 CEST

Original text of this message