diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-03-05 18:28:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-03-05 18:28:43 +0000 |
commit | 368cfb949f26a3df56486c600d39fb44ec9b386a (patch) | |
tree | e58d3aa250ebfb39c5409bb7cf235498771e369c /sysdeps/unix/sysv/linux/sparc/bits | |
parent | 278689e8b500342fe1e187681143a38f15b1ef7f (diff) | |
download | glibc-368cfb949f26a3df56486c600d39fb44ec9b386a.tar glibc-368cfb949f26a3df56486c600d39fb44ec9b386a.tar.gz glibc-368cfb949f26a3df56486c600d39fb44ec9b386a.tar.bz2 glibc-368cfb949f26a3df56486c600d39fb44ec9b386a.zip |
(__S_TYPEISMQ, __S_TYPEISSEM, __S_TYPEISSHM): Rewrite to enforce correct use the macros. They still always return zero.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/stat.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/stat.h b/sysdeps/unix/sysv/linux/sparc/bits/stat.h index 7fe9d4038e..b1a562d116 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/stat.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -76,7 +76,7 @@ struct stat64 __dev_t st_dev; /* Device. */ #if __WORDSIZE == 64 unsigned short int __pad1; -#endif +#endif __ino64_t st_ino; /* File serial number. */ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ @@ -116,10 +116,11 @@ struct stat64 #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ |