Avoid 'static __inline' on HPUX
authorAndrew Deason <adeason@sinenomine.net>
Mon, 19 Oct 2009 03:48:56 +0000 (22:48 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 20 Oct 2009 17:27:57 +0000 (10:27 -0700)
'static __inline' functions on HPUX can segfault the /opt/ansic compiler
(unless we lose debugging symbols). So, just use 'static' for those
functions on HPUX. Also revert a9368a6c3dfe4435ec2ae63fff4a3325104ed9f7,
so we get a static inline function on other platforms.

Reviewed-on: http://gerrit.openafs.org/691
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/bozo/fsbnodeops.c
src/config/stds.h

index 160c244..3016af3 100644 (file)
@@ -158,10 +158,8 @@ struct bnode_ops dafsbnode_ops = {
  * dropping type information
  */
 
-#ifndef AFS_HPUX_ENV
-static_inline 
-#endif
-struct bnode * fsbnode2bnode(struct fsbnode *abnode) {
+static_inline struct bnode *
+fsbnode2bnode(struct fsbnode *abnode) {
     return (struct bnode *) abnode;
 }
 
index f1ff418..6dfee12 100644 (file)
@@ -304,8 +304,10 @@ typedef struct afsUUID afsUUID;
 #define static_inline __inline static
 #define hdr_static_inline(x) __inline static x
 #elif defined(AFS_HPUX_ENV) || defined(AFS_USR_HPUX_ENV)
-#define static_inline static __inline
-#define hdr_static_inline(x) static __inline x
+/* The HPUX compiler can segfault on 'static __inline', so fall back to
+ * just 'static' so we can at least compile */
+#define static_inline static
+#define hdr_static_inline(x) static x
 #elif defined(AFS_AIX_ENV) || defined(AFS_USR_AIX_ENV)
 #define static_inline static
 #define hdr_static_inline(x) static x