- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Why -D_REENTRANT needed to compile applications
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 12:55 AM
тАО06-03-2010 12:55 AM
Why -D_REENTRANT needed to compile applications
OS : HPUX 11iv3
Arch : IA64
Compiler : aCC: HP C/aC++ B3910B A.06.12 [Nov 03 2006]
Doubts :
1. Why do we need to have -D_REENTRANT symbol defined explicitly whenever we use reentrant functions like strtok_r.
Other compilers like the one on Solaris and AIX do not need the same.
Are there any specific advantages of having this symbol explicitly defined on the compile line?
- Tags:
- -mt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 01:29 AM - edited тАО08-21-2011 01:01 PM
тАО06-03-2010 01:29 AM - edited тАО08-21-2011 01:01 PM
Re: Why -D_REENTRANT needed to compile applications
The correct option for multithreading is -mt.
If you aren't using threads, then you are stuck with -D_REENTRANT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 02:20 AM
тАО06-03-2010 02:20 AM
Re: Why -D_REENTRANT needed to compile applications
I wanted to know is why does aCC need explicit symbol defined on the compile-line whereas the compilers on Solaris or AIX include this symbol by default?
Is it any performance related issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2010 06:30 AM
тАО06-04-2010 06:30 AM
Re: Why -D_REENTRANT needed to compile applications
Because this is decided by various standardization issues and has nothing to do with the compiler.
>Is it any performance related issue?
I wouldn't think so. The _r forms put the burden on the user.