From: Ian Jackson (ijackson@nyx.cs.du.edu)
Date: 07/28/93


From: ijackson@nyx.cs.du.edu (Ian Jackson)
Subject: <asm/bitops.h>: __inline__ needed where inline found
Date: Wed, 28 Jul 1993 16:35:46 GMT


<sys/sem.h> includes <asm/bitopts.h>.

However <asm/bitopts.h> doesn't compile with gcc -traditional
because it uses the keyword `inline' which is switched off when using
-traditional (or -ansi).

This prevents Perl from compiling with semaphore support.

The solution is to use the alternate keyword __inline__ instead.

Patch enclosed below, to 0.99pl10 + net2-e.
I don't have pl11 here so I can't check it against that.

Should the general include files be cribbing lots of stuff out of
linux/ and asm/ ? That leaves the door open to this kind of thing,
because the kernel maintainters who write the linux/ and asm/ headers
don't necessarily expect their code to be compiled using -traditional
or -ansi (indeed, nowadays it will be compiled with g++!).

--- include/asm/bitops.h~ Tue Apr 13 19:46:00 1993
+++ include/asm/bitops.h Wed Jul 28 16:09:10 1993
@@ -18,7 +18,7 @@
 struct __dummy { unsigned long a[100]; };
 #define ADDR (*(struct __dummy *) addr)
 
-extern inline int set_bit(int nr, void * addr)
+extern __inline__ int set_bit(int nr, void * addr)
 {
        unsigned char ok;
 
@@ -28,7 +28,7 @@
        return ok;
 }
 
-extern inline int clear_bit(int nr, void * addr)
+extern __inline__ int clear_bit(int nr, void * addr)
 {
        unsigned char ok;
 
@@ -42,7 +42,7 @@
  * This routine doesn't need to be atomic, but it's faster to code it
  * this way.
  */
-extern inline int test_bit(int nr, void * addr)
+extern __inline__ int test_bit(int nr, void * addr)
 {
        unsigned char ok;
 
@@ -68,7 +68,7 @@
  * C language equivalents written by Theodore Ts'o, 9/26/92
  */
 
-extern inline int set_bit(int nr,int * addr)
+extern __inline__ int set_bit(int nr,int * addr)
 {
        int mask, retval;
 
@@ -81,7 +81,7 @@
        return retval;
 }
 
-extern inline int clear_bit(int nr, int * addr)
+extern __inline__ int clear_bit(int nr, int * addr)
 {
        int mask, retval;
 
@@ -94,7 +94,7 @@
        return retval;
 }
 
-extern inline int test_bit(int nr, int * addr)
+extern __inline__ int test_bit(int nr, int * addr)
 {
        int mask;