Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7713335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:51:01+00:00 2026-06-01T01:51:01+00:00

I am auditing C code that has been generated from Pro*C ages ago, and

  • 0

I am auditing C code that has been generated from Pro*C ages ago, and I have found this:

static const struct sqlcxp sqlfpn =
{
    33,
    "d:¥¥VS¥¥Projects¥¥SOMEDIR¥¥somefile.pc"
};

Absolute paths in code are forbidden by our quality rules.
Is Oracle’s Pro*C→C converter really doing such a bad thing, or did I miss something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:51:03+00:00Added an answer on June 1, 2026 at 1:51 am

    This is used by the undocumented sqlctx() function, and I don’t think you can stop Pro*C generating this structure. I’m not sure it’s intrinsically a bad thing, it’s just something that appears in the generated code and is used internally by Oracle.

    You’ll also see the full path of the original .pc file in #line directives, if you have the LINES precompiler option turned on. (This allows the C compiler to report errors against the line number in the original source file, which is much handier than trying to figure it out from the line in the generated source).

    I suspect, but I’m not entirely sure, that it’s included in sqlctx() so the value can be used for internal errors too, and possibly for debugging.

    From a coding standards perspective, having full paths in your source is probably considered a bad thing because you’d have to touch the code if the paths changed; but that seems rather moot in generated code as the new path will be picked up automatically on next build. However, if there are other reasons – a blanket security requirement to reveal minimal build information maybe – then you should be aware that the full path will also appear in the final binary. (In Linux, strings shows the full path; no idea about a Windows equivalent but I’d imagine it’s there somewhere). If you’re auditing generated code then it sounds like a security rather than practical thing.

    You can avoid the full path, if it really matters, by moving into the source directory and just giving the file name with no path in the iname, i.e.

    cd d:\VS\Projects\SOMEDIR
    proc iname=somefile.pc ...
    

    instead of

    proc iname=d:\VS\Projects\SOMEDIR\somefile.pc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an auditing trigger that automatically places the time something was updated and
Given a database that has numerous repeating columns used for auditing and versioning, what
I have a trigger that is used for auditing inserted, updated and deleted rows.
I have a large auditing stored procedure that prints values and runs some SELECT
I have a number of files that are generated in a function defined as:
I have a table called Card that I am auditing with a shadow table
I have this code: public byte[] SerializeToBlob() { using (var buffer = new MemoryStream())
I'm writing some logging/auditing code that will be running in production (not just when
I do not want Auditing or History tracking. I have an application that pulls
I'm revisiting and re-implementing the code that caused me to ask this question about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.