"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/isc/win32/include/isc/stat.h" (4 Sep 2020, 1629 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "stat.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef ISC_STAT_H
   13 #define ISC_STAT_H 1
   14 
   15 #include <sys/stat.h>
   16 
   17 /*
   18  * Windows doesn't typedef this.
   19  */
   20 typedef unsigned short mode_t;
   21 
   22 /* open() under unix allows setting of read/write permissions
   23  * at the owner, group and other levels.  These don't exist in NT
   24  * We'll just map them all to the NT equivalent
   25  */
   26 
   27 #define S_IREAD  _S_IREAD  /* read permission, owner */
   28 #define S_IWRITE _S_IWRITE /* write permission, owner */
   29 #define S_IRUSR  _S_IREAD  /* Owner read permission */
   30 #define S_IWUSR  _S_IWRITE /* Owner write permission */
   31 #define S_IRGRP  _S_IREAD  /* Group read permission */
   32 #define S_IWGRP  _S_IWRITE /* Group write permission */
   33 #define S_IROTH  _S_IREAD  /* Other read permission */
   34 #define S_IWOTH  _S_IWRITE /* Other write permission */
   35 
   36 #ifndef S_IFMT
   37 #define S_IFMT _S_IFMT
   38 #endif /* ifndef S_IFMT */
   39 #ifndef S_IFDIR
   40 #define S_IFDIR _S_IFDIR
   41 #endif /* ifndef S_IFDIR */
   42 #ifndef S_IFCHR
   43 #define S_IFCHR _S_IFCHR
   44 #endif /* ifndef S_IFCHR */
   45 #ifndef S_IFREG
   46 #define S_IFREG _S_IFREG
   47 #endif /* ifndef S_IFREG */
   48 
   49 #ifndef S_ISDIR
   50 #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
   51 #endif /* ifndef S_ISDIR */
   52 #ifndef S_ISREG
   53 #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
   54 #endif /* ifndef S_ISREG */
   55 
   56 #endif /* ISC_STAT_H */