mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
Remove all S_IS* and S_IF* definitions.
Instead, just include "stat-macros.h".
This commit is contained in:
1 parent
8836ff8b3c
commit
77e4428e58
3 files changed
+7
-59
No files matched your search
+2
-9
@@ -1,5 +1,5 @@
|
||||
/* isdir.c -- determine whether a directory exists
|
||||
Copyright (C) 1990, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1998, 2004 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
@@ -21,14 +21,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(Mode) (((Mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
#include "stat-macros.h"
|
||||
|
||||
/* If PATH is an existing directory or symbolic link to a directory,
|
||||
return nonzero, else 0. */
|
||||
|
||||
+1
-12
@@ -26,18 +26,7 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
#include "lchown.h"
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISLNK
|
||||
#endif
|
||||
|
||||
#ifndef S_ISLNK
|
||||
# ifdef S_IFLNK
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
# else
|
||||
# define S_ISLNK(m) 0
|
||||
# endif
|
||||
#endif
|
||||
#include "stat-macros.h"
|
||||
|
||||
/* Declare chown to avoid a warning. Don't include unistd.h,
|
||||
because it may have a conflicting prototype for lchown. */
|
||||
|
||||
+4
-38
@@ -1,6 +1,6 @@
|
||||
/* makepath.c -- Ensure that a directory path exists.
|
||||
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003 Free
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -34,18 +34,6 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXUGO
|
||||
# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <errno.h>
|
||||
@@ -56,31 +44,6 @@ extern int errno;
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef S_ISUID
|
||||
# define S_ISUID 04000
|
||||
#endif
|
||||
#ifndef S_ISGID
|
||||
# define S_ISGID 02000
|
||||
#endif
|
||||
#ifndef S_ISVTX
|
||||
# define S_ISVTX 01000
|
||||
#endif
|
||||
#ifndef S_IRUSR
|
||||
# define S_IRUSR 0200
|
||||
#endif
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0200
|
||||
#endif
|
||||
#ifndef S_IXUSR
|
||||
# define S_IXUSR 0100
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXU
|
||||
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
|
||||
#endif
|
||||
|
||||
#define WX_USR (S_IWUSR | S_IXUSR)
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
@@ -88,6 +51,9 @@ extern int errno;
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
#include "quote.h"
|
||||
#include "stat-macros.h"
|
||||
|
||||
#define WX_USR (S_IWUSR | S_IXUSR)
|
||||
|
||||
#define CLEANUP_CWD \
|
||||
do \
|
||||
|
||||
Reference in new issue
Block a user