aboutsummaryrefslogtreecommitdiff
path: root/optimize.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2023-02-18 15:00:14 +0000
committerDenis Ovsienko <denis@ovsienko.info>2023-02-18 16:18:12 +0000
commitcda978e6773a28bb559972a76714cb341e92f732 (patch)
tree5d6d29d1d88fdd1a34033bd6682bb500981d0ec2 /optimize.c
parent3d4434b380d6be3d5645a1005cab10444faa8913 (diff)
Remove prototype header for HP-UX 11.x.
HP-UX 11.00 was released in 1997; lbl/os-hpux11.h was introduced via commit 7ec2e59 in 2002. The only prototype in the header is for ffs(), and HP-UX 11.31 (11i v3), which was released in 2007, has the prototype, albeit not in the standard header. Remove lbl/os-hpux11.h and update the lowest_set_bit() block in optimize.c to recognize HP-UX specifics.
Diffstat (limited to 'optimize.c')
-rw-r--r--optimize.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/optimize.c b/optimize.c
index 9af4c15d..94ecfc15 100644
--- a/optimize.c
+++ b/optimize.c
@@ -141,12 +141,6 @@ lowest_set_bit(int mask)
abort(); /* mask is zero */
return (u_int)bit;
}
-#elif defined(MSDOS) && defined(__DJGPP__)
- /*
- * MS-DOS with DJGPP, which declares ffs() in <string.h>, which
- * we've already included.
- */
- #define lowest_set_bit(mask) ((u_int)(ffs((mask)) - 1))
#elif (defined(MSDOS) && defined(__WATCOMC__)) || defined(STRINGS_H_DECLARES_FFS)
/*
* MS-DOS with Watcom C, which has <strings.h> and declares ffs() there,
@@ -155,6 +149,14 @@ lowest_set_bit(int mask)
*/
#include <strings.h>
#define lowest_set_bit(mask) (u_int)((ffs((mask)) - 1))
+#elif (defined(MSDOS) && defined(__DJGPP__)) || defined(__hpux)
+ /*
+ * MS-DOS with DJGPP or HP-UX 11i v3, which declare ffs() in <string.h>,
+ * which we've already included. Place this branch after the <strings.h>
+ * branch, in case a later release of HP-UX makes the declaration available
+ * via the standard header.
+ */
+ #define lowest_set_bit(mask) ((u_int)(ffs((mask)) - 1))
#else
/*
* None of the above.