HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cc compile
Operating System - HP-UX
1834458
Members
3117
Online
110067
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-31-2009 01:03 PM
03-31-2009 01:03 PM
cc compile
When compiling with cc on HP-UX 11.23 OS on hp9000 server, getting this warning:
cpp: "/usr/include/sys/stdsyms.h". line 19: warning 2001: Redefinition of macro. _INCLUDE_POSIX_SOURCE
the compile command looks like this:
cc -c -I/opt/mqm/inc -I. -Ae +U4 +DA1.0 +w3 +O2 -lmqm getmsgs.c
The c programs compile - but need to know what to do with the warning.
Let me know if more info is needed.
cpp: "/usr/include/sys/stdsyms.h". line 19: warning 2001: Redefinition of macro. _INCLUDE_POSIX_SOURCE
the compile command looks like this:
cc -c -I/opt/mqm/inc -I. -Ae +U4 +DA1.0 +w3 +O2 -lmqm getmsgs.c
The c programs compile - but need to know what to do with the warning.
Let me know if more info is needed.
If it isn't one thing, it's another
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2009 02:27 PM
03-31-2009 02:27 PM
Re: cc compile
> [...] but need to know [...]
This may depend on how much you care.
> [...] Redefinition of macro [...]
So, in how many places is
_INCLUDE_POSIX_SOURCE getting defined? The
warning message tells you where the second
one happened. Where's the first one? And
whose fault is it?
> [...] -Ae +U4 +DA1.0 +w3 [...]
I know nothing. Does any of those imply a
definition for _INCLUDE_POSIX_SOURCE?
> [...] getmsgs.c
Can't see it. Can you provide a small
failing test case?
This may depend on how much you care.
> [...] Redefinition of macro [...]
So, in how many places is
_INCLUDE_POSIX_SOURCE getting defined? The
warning message tells you where the second
one happened. Where's the first one? And
whose fault is it?
> [...] -Ae +U4 +DA1.0 +w3 [...]
I know nothing. Does any of those imply a
definition for _INCLUDE_POSIX_SOURCE?
> [...] getmsgs.c
Can't see it. Can you provide a small
failing test case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2009 04:34 PM
03-31-2009 04:34 PM
Re: cc compile
If you are getting warning 2001 on _INCLUDE_POSIX_SOURCE, it means you have illegally defined that variable, instead of _POSIX_SOURCE.
To debug macros you can use:
cc ... -Wp,-C,-G -E > getmsgs.i
Then look for _INCLUDE_POSIX_SOURCE.
>-Ae +U4 +DA1.0 +w3 +O2 -lmqm getmsgs.c
There is a +u4 but not +U4.
The use of +DA1.0 is not supported after 10.10, replace by +DAportable.
You should really have your libs after your sources/objects: getmsgs.c -lmqm
You shouldn't be using +w3 to suppress all warnings, better to use +W with a list of messages to suppress.
To debug macros you can use:
cc ... -Wp,-C,-G -E > getmsgs.i
Then look for _INCLUDE_POSIX_SOURCE.
>-Ae +U4 +DA1.0 +w3 +O2 -lmqm getmsgs.c
There is a +u4 but not +U4.
The use of +DA1.0 is not supported after 10.10, replace by +DAportable.
You should really have your libs after your sources/objects: getmsgs.c -lmqm
You shouldn't be using +w3 to suppress all warnings, better to use +W with a list of messages to suppress.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP