patch-2.4.0-test9 linux/include/linux/byteorder/swab.h
Next file: linux/include/linux/capability.h
Previous file: linux/include/linux/brlock.h
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Tue Sep 19 17:56:31 2000
- Orig file:
v2.4.0-test8/linux/include/linux/byteorder/swab.h
- Orig date:
Tue Sep 1 10:50:11 1998
diff -u --recursive --new-file v2.4.0-test8/linux/include/linux/byteorder/swab.h linux/include/linux/byteorder/swab.h
@@ -43,33 +43,33 @@
* provide defaults when no architecture-specific optimization is detected
*/
#ifndef __arch__swab16
-# define __arch__swab16(x) ___swab16(x)
+# define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); })
#endif
#ifndef __arch__swab32
-# define __arch__swab32(x) ___swab32(x)
+# define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); })
#endif
#ifndef __arch__swab64
-# define __arch__swab64(x) ___swab64(x)
+# define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); })
#endif
#ifndef __arch__swab16p
-# define __arch__swab16p(x) __swab16(*(x))
+# define __arch__swab16p(x) __arch__swab16(*(x))
#endif
#ifndef __arch__swab32p
-# define __arch__swab32p(x) __swab32(*(x))
+# define __arch__swab32p(x) __arch__swab32(*(x))
#endif
#ifndef __arch__swab64p
-# define __arch__swab64p(x) __swab64(*(x))
+# define __arch__swab64p(x) __arch__swab64(*(x))
#endif
#ifndef __arch__swab16s
-# define __arch__swab16s(x) do { *(x) = __swab16p((x)); } while (0)
+# define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0)
#endif
#ifndef __arch__swab32s
-# define __arch__swab32s(x) do { *(x) = __swab32p((x)); } while (0)
+# define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0)
#endif
#ifndef __arch__swab64s
-# define __arch__swab64s(x) do { *(x) = __swab64p((x)); } while (0)
+# define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)