Skip to content

Commit

Permalink
asm-*/posix_types.h: scrub __GLIBC__
Browse files Browse the repository at this point in the history
Some arches (like alpha and ia64) already have a clean posix_types.h header.
This brings all the others in line by removing all references to __GLIBC__
(and some undocumented __USE_ALL).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
vapier authored and Linus Torvalds committed Feb 8, 2008
1 parent 90b315a commit 531d7d4
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 81 deletions.
6 changes: 1 addition & 5 deletions include/asm-arm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
#define __FD_SET(fd, fdsetp) \
Expand Down
4 changes: 0 additions & 4 deletions include/asm-avr32/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__)
Expand Down
8 changes: 2 additions & 6 deletions include/asm-blackfin/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
Expand All @@ -60,6 +56,6 @@ typedef struct {
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif
4 changes: 0 additions & 4 deletions include/asm-cris/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#ifdef __KERNEL__
Expand Down
8 changes: 2 additions & 6 deletions include/asm-frv/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
Expand All @@ -60,7 +56,7 @@ typedef struct {
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif

8 changes: 2 additions & 6 deletions include/asm-h8300/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
Expand All @@ -59,6 +55,6 @@ typedef struct {
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif
8 changes: 2 additions & 6 deletions include/asm-m32r/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
Expand Down Expand Up @@ -117,6 +113,6 @@ static __inline__ void __FD_ZERO(__kernel_fd_set *__p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif /* _ASM_M32R_POSIX_TYPES_H */
8 changes: 2 additions & 6 deletions include/asm-m68k/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
Expand All @@ -60,6 +56,6 @@ typedef struct {
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif
4 changes: 2 additions & 2 deletions include/asm-mips/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ typedef struct {
#endif
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
Expand Down Expand Up @@ -139,6 +139,6 @@ static __inline__ void __FD_ZERO(__kernel_fd_set *__p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif /* _ASM_POSIX_TYPES_H */
8 changes: 2 additions & 6 deletions include/asm-parisc/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,14 @@ typedef unsigned long long __kernel_ino64_t;
typedef unsigned int __kernel_old_dev_t;

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

/* compatibility stuff */
typedef __kernel_uid_t __kernel_old_uid_t;
typedef __kernel_gid_t __kernel_old_gid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
Expand Down Expand Up @@ -128,6 +124,6 @@ static __inline__ void __FD_ZERO(__kernel_fd_set *__p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif
5 changes: 2 additions & 3 deletions include/asm-powerpc/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ typedef struct {

#else /* __GNUC__ */

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
#if defined(__KERNEL__)
/* With GNU C, use inline functions instead so args are evaluated only once: */

#undef __FD_SET
Expand Down Expand Up @@ -124,6 +123,6 @@ static __inline__ void __FD_ZERO(__kernel_fd_set *p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */
#endif /* __GNUC__ */
#endif /* _ASM_POWERPC_POSIX_TYPES_H */
8 changes: 2 additions & 6 deletions include/asm-sparc/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
Expand Down Expand Up @@ -117,6 +113,6 @@ static inline void __FD_ZERO(__kernel_fd_set *p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif /* !(__ARCH_SPARC_POSIX_TYPES_H) */
8 changes: 2 additions & 6 deletions include/asm-sparc64/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
Expand Down Expand Up @@ -121,6 +117,6 @@ static inline void __FD_ZERO(__kernel_fd_set *p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif /* !(__ARCH_SPARC64_POSIX_TYPES_H) */
8 changes: 2 additions & 6 deletions include/asm-v850/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ typedef __kernel_uid_t __kernel_old_uid_t;
typedef unsigned int __kernel_old_dev_t;

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;


#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

/* We used to include <asm/bitops.h> here, which seems the right thing, but
it caused nasty include-file definition order problems. Removing the
Expand All @@ -71,6 +67,6 @@ typedef struct {
#define __FD_ZERO(fd_set) \
memset (fd_set, 0, sizeof (*(fd_set *)fd_set))

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif /* __V850_POSIX_TYPES_H__ */
8 changes: 2 additions & 6 deletions include/asm-x86/posix_types_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ typedef long long __kernel_loff_t;
#endif

typedef struct {
#if defined(__KERNEL__) || defined(__USE_ALL)
int val[2];
#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
int __val[2];
#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
} __kernel_fsid_t;

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if defined(__KERNEL__)

#undef __FD_SET
#define __FD_SET(fd,fdsetp) \
Expand Down Expand Up @@ -77,6 +73,6 @@ do { \
"2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \
} while (0)

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */

#endif
5 changes: 2 additions & 3 deletions include/asm-xtensa/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ typedef struct {

#else /* __GNUC__ */

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
#if defined(__KERNEL__)
/* With GNU C, use inline functions instead so args are evaluated only once: */

#undef __FD_SET
Expand Down Expand Up @@ -118,6 +117,6 @@ static __inline__ void __FD_ZERO(__kernel_fd_set *p)
}
}

#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
#endif /* defined(__KERNEL__) */
#endif /* __GNUC__ */
#endif /* _XTENSA_POSIX_TYPES_H */

0 comments on commit 531d7d4

Please sign in to comment.