Home » Developer & Programmer » Precompilers, OCI & OCCI » Syntax error in /usr/include/sys/ header files during Pro*C Compilation (solaris 10 + oracle 10)
Syntax error in /usr/include/sys/ header files during Pro*C Compilation [message #278354] Sat, 03 November 2007 05:00 Go to next message
proc-developer
Messages: 2
Registered: October 2007
Junior Member
I am trying to migrate old code to new solaris 10 box
Comilers used are-

Proc * C compiler - Release 10.2
CC compiler - Sun Workshop 6 Update 2 C 5.3
and Oracle installed is 10.2.0.3.

Syntax error at line 69, column 2, file /usr/include/sys/uio.h:
Error at line 69, column 2 in file /usr/include/sys/uio.h
lloff_t _uio_offset; /* file offset */
.1
PCC-S-02201, Encountered the symbol "lloff_t" when expecting one of the followin
g:
} char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,
The symbol "enum," was substituted for "lloff_t" to continue.

Any guess why this is happening?

Re: Syntax error in /usr/include/sys/ header files during Pro*C Compilation [message #321401 is a reply to message #278354] Tue, 20 May 2008 03:06 Go to previous message
anandrathi
Messages: 2
Registered: May 2008
Junior Member

The problem is with Pro*C Pre Compiler
Explanation :
The uio.h files seeks definition of _LONG_LONG_HTOL which is defined in
/usr/include/sys/isa_defs.h or [some path ]sys/isa_defs.h

isa_defs.h seeks defination of architecture, Which the relevant compiler must be passing
like i386 , __sparc.. etc

Now pro*c dosent implicitly define this macro so ultimately _LONG_LONG_HTOL uio.h dosent
get _LONG_LONG_HTOL definition.

So you must define it explicitly like

DEFINE=__sparc
either at command line or in ${ORACLE_HOME}/precomp/admin/pcscfg.cfg

which will solve this problem

Thanks
Anand Rathi
Systems Architect
Previous Topic: performance statistics
Next Topic: how to write PRO*C program for SQL queries
Goto Forum:
  


Current Time: Fri Mar 29 01:46:06 CDT 2024