summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/DynamicLoader.cxx
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-11 14:59:16 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-11 14:59:16 (GMT)
commit46096c08a5a21c16cbad7d132711348607ee5034 (patch)
tree7f65ede0d6ea6763bebab1151bbe502b8fde6104 /Source/kwsys/DynamicLoader.cxx
parent347efdedd5db5b7a05115ae334ec35d03ef76516 (diff)
downloadCMake-46096c08a5a21c16cbad7d132711348607ee5034.zip
CMake-46096c08a5a21c16cbad7d132711348607ee5034.tar.gz
CMake-46096c08a5a21c16cbad7d132711348607ee5034.tar.bz2
ENH: Add support for LastError on HPUX
Diffstat (limited to 'Source/kwsys/DynamicLoader.cxx')
-rw-r--r--Source/kwsys/DynamicLoader.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx
index a2426b9..fcd4df3 100644
--- a/Source/kwsys/DynamicLoader.cxx
+++ b/Source/kwsys/DynamicLoader.cxx
@@ -22,6 +22,10 @@
#endif //MAC_OS_X_VERSION_MIN_REQUIRED < 1030
#endif // __APPLE__
+#ifdef __hpux
+#include <errno.h>
+#endif //__hpux
+
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
@@ -119,6 +123,13 @@ const char* DynamicLoader::LastError()
* The specified handle is invalid.
*/
+ if( errno == ENOEXEC
+ || errno == ENOSYM
+ || errno == EINVAL )
+ {
+ return strerror(errno);
+ }
+ // else
return 0;
}