OSDN Git Service

Code drop from //branches/cupcake/...@124589
[android-x86/prebuilt.git] / linux-x86 / toolchain / i686-unknown-linux-gnu-4.2.1 / lib / gcc / i686-unknown-linux-gnu / 4.2.1 / include / asm / posix_types.h
diff --git a/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/lib/gcc/i686-unknown-linux-gnu/4.2.1/include/asm/posix_types.h b/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/lib/gcc/i686-unknown-linux-gnu/4.2.1/include/asm/posix_types.h
new file mode 100644 (file)
index 0000000..ca9ab7a
--- /dev/null
@@ -0,0 +1,29 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+       "/usr/include/asm/posix_types.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+/* This file fixes a bug in the __FD_ZERO macro
+   for older versions of the Linux kernel. */
+#ifndef _POSIX_TYPES_H_WRAPPER
+#include <features.h>
+ #include_next <asm/posix_types.h>
+
+#if defined(__FD_ZERO) && !defined(__GLIBC__)
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) \
+  do { \
+    int __d0, __d1; \
+__asm__ __volatile__("cld ; rep ; stosl" \
+: "=&c" (__d0), "=&D" (__d1) \
+: "a" (0), "0" (__FDSET_LONGS), \
+  "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
+  } while (0)
+#endif
+
+#define _POSIX_TYPES_H_WRAPPER
+#endif /* _POSIX_TYPES_H_WRAPPER */