aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/gdb_stat.h
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2012-11-15 16:12:19 +0000
committerPierre Muller <muller@sourceware.org>2012-11-15 16:12:19 +0000
commit8bdce1ffdf65dc18332dfddb39482f6685cec85a (patch)
treebaf333dd105f99f14a4b4ebfca4f91e0a76eba29 /gdb/common/gdb_stat.h
parent3a731e0fc7b80a274d4a34fed7ed41d6f35f1e51 (diff)
downloadgdb-8bdce1ffdf65dc18332dfddb39482f6685cec85a.zip
gdb-8bdce1ffdf65dc18332dfddb39482f6685cec85a.tar.gz
gdb-8bdce1ffdf65dc18332dfddb39482f6685cec85a.tar.bz2
2012-11-15 Pierre Muller <muller@sourceware.org>
ARI fixes: move gdb_wait and gdb_stat headers to common subdirectory. * gdb_stat.h: Delete. Moved to common directory. * common/gdb_stat.h: New file. * gdb_wait.h: Delete. Moved to common directory. * common/gdb_wait.h: New file. * Makefile.in (H_FILES_NO_SRC): Adapt to new header location. * contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h location. (stat.h rule): Adapt to new gdb_stat.h location. * common/linux-osdata.c: Include "gdb_stat.h" header instead of <sys/stat.h> header. * common/linux-ptrace.c: Include "gdb_wait.h" header instead of <sys/wait.h> header. gdbserver ChangeLog entry: 2012-11-15 Pierre Muller <muller@sourceware.org> * configure.ac (AC_CHECK_HEADERS): Add wait.h header. * config.in: Regenerate. * configure: Regenerate. * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header. Use "gdb_wait.h" header instead of <sys/wait.h> header. * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header. * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h> header. * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header instead of <sys/wait.h> header. * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
Diffstat (limited to 'gdb/common/gdb_stat.h')
-rw-r--r--gdb/common/gdb_stat.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/gdb/common/gdb_stat.h b/gdb/common/gdb_stat.h
new file mode 100644
index 0000000..51e2e56
--- /dev/null
+++ b/gdb/common/gdb_stat.h
@@ -0,0 +1,59 @@
+/* Portable <sys/stat.h>
+ Copyright (C) 1995, 2007-2012 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if !defined(GDB_STAT_H)
+#define GDB_STAT_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if !defined(S_ISBLK) && defined(S_IFBLK)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#endif
+#if !defined(S_ISCHR) && defined(S_IFCHR)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#endif
+#if !defined(S_ISDIR) && defined(S_IFDIR)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+#if !defined(S_ISREG) && defined(S_IFREG)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+#if !defined(S_ISFIFO) && defined(S_IFIFO)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#endif
+#if !defined(S_ISLNK) && defined(S_IFLNK)
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+#if !defined(S_ISSOCK) && defined(S_IFSOCK)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+#endif
+#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
+#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+#endif
+#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
+#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+#endif
+
+/* Microsoft C's stat.h doesn't define all the POSIX file modes. */
+#ifndef S_IROTH
+#define S_IROTH S_IREAD
+#endif
+
+#endif /* !defined(GDB_STAT_H) */