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 7820477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:18:31+00:00 2026-06-02T07:18:31+00:00

I’ll use openssl installed header structure for this example: /usr/include (or some folder in

  • 0

I’ll use openssl installed header structure for this example:

/usr/include       (or some folder in include search path on Windows box)
  |
  + --openssl
       |
       +-- e_os2.h
       +-- rsa.h
       +-- sha.h
      ...

/usr/include is in compiler include search path. OpenSSL header are commonly included this way: #include <openssl/sha.h>

As a first line, openssl/sha.h has this include: #include <openssl/e_os2.h>.
So, my question: is it really good idea for installed header to refer to header in the same folder that way? When it refers to e_os2.h that way it’s possible that it picks up e_os2.h from some other location, not necessarily in the same folder as sha.h. For example, if I had a local copy of openssl includes in some location and included that sha.h this way: #include "../../3rdpath/openssl/sha.h then I may get some nasty bugs in my code by combining incompatible version of headers.

Considering the fact that compilers behave differently regarding #incldue <...> vs #incldue "..." what would be proper way for a lib like openssl to include it’s headers?

I thought, that the way openssl does is the most wrong way to do it. The other two ways are:

a) #include "e_os2.h"

and

b) #include "./e_os2.h"

The openssl way is:

c) #include <openssl/e_os2.h>

Is that bad decision to do the way it’s done in openssl? Any problems with a) or b)? b) means to include e_os2.h only from the same folder, is that guaranteed with all major compilers (ms cl, armcc, intel cl, gcc et all)?

  • 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-02T07:18:37+00:00Added an answer on June 2, 2026 at 7:18 am

    Your first option is the most open to doing the wrong thing; it’ll find files by the given name in packages of headers belonging to other libraries altogether. Your second one at best gives undefined behavior; I wouldn’t expect it to work most of the time. The third way is the correct way; it will only include openssl’s version of the file. If you arrange to replace some header by putting another incomplete openssl directory in your include path, then I’d assume you know what you’re doing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
i got an object with contents of html markup in it, for example: string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.