- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Error compiling posix threds program?
Operating System - HP-UX
1752772
Members
5433
Online
108789
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО01-26-2010 03:51 AM
тАО01-26-2010 03:51 AM
Hi,
Why this program doesn't compile?
<>
m3vmsa3.extpex /tmp > cat kk.c
#include
void TPV_closing_state(void *arg){}
int main()
{
void *obj= 0L ;
pthread_cleanup_push(TPV_closing_state, (void *)obj);
}
m3vmsa3.extpex /tmp > aCC -AA -D_POSIX_THREADS_ -D_RWSTD_MULTI_THREAD kk.c
Error 20: "kk.c", line 8679 # '}' expected before ''.
m3vmsa3.extpex /tmp > aCC -V
aCC: HP ANSI C++ B3910B A.03.27
<>
Thanks in advance,
Jose Luis
Why this program doesn't compile?
<
m3vmsa3.extpex /tmp > cat kk.c
#include
void TPV_closing_state(void *arg){}
int main()
{
void *obj= 0L ;
pthread_cleanup_push(TPV_closing_state, (void *)obj);
}
m3vmsa3.extpex /tmp > aCC -AA -D_POSIX_THREADS_ -D_RWSTD_MULTI_THREAD kk.c
Error 20: "kk.c", line 8679 # '}' expected before '
m3vmsa3.extpex /tmp > aCC -V
aCC: HP ANSI C++ B3910B A.03.27
<
Thanks in advance,
Jose Luis
Solved! Go to Solution.
- Tags:
- pthread
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2010 04:26 AM
тАО01-26-2010 04:26 AM
Re: Error compiling posix threds program?
>Why this program doesn't compile?
Is pthread_cleanup_push(3t) defined in? What OS version are you using?
A.03.27 is obsolete, the latest is A.03.85.
(If -mt is supported, you should use that.)
Is pthread_cleanup_push(3t) defined in
A.03.27 is obsolete, the latest is A.03.85.
(If -mt is supported, you should use that.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2010 06:23 AM
тАО01-26-2010 06:23 AM
Re: Error compiling posix threds program?
Hi,
This is my OS version and the code generated with the "-P" option:
<
m3vmsa3.extpex /tmp > aCC -P -AA -D_POSIX_THREADS_ -D_RWSTD_MULTI_THREAD kk.c
m3vmsa3.extpex /tmp > tail -6 kk.i
void TPV_closing_state(void *arg){}
int main()
{
void *obj= 0L ;
{ __pthread_cleanup_handler_t __handler, **__handler_queue; __handler.__handler_function = TPV_closing_state; __handler.__handler_arg = (void *)obj; __handler_queue = (__pthread_cleanup_handler_t **)(__pthread_cancel_stack()); __handler.__next_handler = *__handler_queue; *__handler_queue = &__handler; ;
}
m3vmsa3.extpex /tmp > uname -a
HP-UX m3vmsa3 B.11.00 U 9000/800 178951547 unlimited-user license
m3vmsa3.extpex /tmp > aCC -mt -AA -D_POSIX_THREADS_ -D_RWSTD_MULTI_THREAD kk.c
aCC: warning 901: unknown option: `-mt': use +help for online documentation.
Error 20: "kk.c", line 8679 # '}' expected before '
<
Is is strange, the precompiled code has an extra "}".
The "-mt" option is not supported.
Regards,
Jose Luis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2010 03:30 PM
тАО01-26-2010 03:30 PM
Solution
>the code generated with the "-P" option:
A better option is: -E -.i
>B.11.00
This isn't supported.
>Is it strange, the precompiled code has an extra "}".
It appears these are macros and you need to use them in pairs:
pthread_cleanup_push(TPV_closing_state, (void*)obj);
; // stuff
pthread_cleanup_pop(true);
A better option is: -E -.i
>B.11.00
This isn't supported.
>Is it strange, the precompiled code has an extra "}".
It appears these are macros and you need to use them in pairs:
pthread_cleanup_push(TPV_closing_state, (void*)obj);
; // stuff
pthread_cleanup_pop(true);
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP