Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strsignal() function is on available on HP-UX IA64 v3 #11

Open
GoogleCodeExporter opened this issue Oct 11, 2015 · 3 comments
Open

strsignal() function is on available on HP-UX IA64 v3 #11

GoogleCodeExporter opened this issue Oct 11, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. compile any unit tests bundle and link it against cmockery

What is the expected output? What do you see instead?

Linking fails with the following error:

ld: Unsatisfied symbol "strsignal" in file cmockery.o

What version of the product are you using? On what operating system?

1. cmockery-0.1.2
2. HP-UX 11 IA64 v3

uname -a

HP-UX hpitv3 B.11.31 U ia64 0383467329 unlimited-user license

Please provide any additional information below.

The 'strsignal()' function is not available on HP-UX. The following is not a 
proper 
solution but the workaround. Using _HPUX macro allows to link successfully on 
HP-UX.

--- cmockery.c  Sat Aug 30 02:55:54 2008
+++ cmockery.c  Tue Jul 21 10:44:53 2009
@@ -1402,7 +1402,11 @@

 #ifndef _WIN32
 static void exception_handler(int sig) {
+#ifdef _HPUX
+   print_error("%d\n", sig);
+#else
    print_error("%s\n", strsignal(sig));
+#endif
    exit_test(1);
 }

Original issue reported on code.google.com by ade...@gmail.com on 21 Jul 2009 at 10:20

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Please implement this simple and innocuous fix. We HP-UX users may not have the 
biggest market share, but there are still plenty of HP-UX machines running 
mission-critical applications all around the world.

The definition check should be on "__hpux" rather than _HPUX since: "__hpux is 
defined in all C/C++ compilers (both gcc/g++ and HP's C/C++) in all releases of 
HP-UX."

Original comment by mvpe...@gmail.com on 7 Jul 2012 at 3:03

@GoogleCodeExporter
Copy link
Author

The libiberty library contains strsignal(), this would be an alternative to 
omitting the use of strsignal entirely.

Original comment by mvpe...@gmail.com on 7 Jul 2012 at 3:07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant