Print this page
remove support for non-ANSI compilation


   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*


  27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 
  31 #ifndef _SYS_STATVFS_H
  32 #define _SYS_STATVFS_H
  33 
  34 #pragma ident   "%Z%%M% %I%     %E% SMI"        /* SVr4.0 1.10 */
  35 
  36 #include <sys/feature_tests.h>
  37 #include <sys/types.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * Structure returned by statvfs(2).
  45  */
  46 
  47 #define _FSTYPSZ        16
  48 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  49 #ifndef FSTYPSZ
  50 #define FSTYPSZ _FSTYPSZ
  51 #endif
  52 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
  53 
  54 typedef struct statvfs {
  55         unsigned long   f_bsize;        /* fundamental file system block size */


 171 #define statvfs                 statvfs64
 172 #define fstatvfs                fstatvfs64
 173 #endif
 174 #endif  /* !_LP64 && _FILE_OFFSET_BITS == 64 */
 175 
 176 #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
 177 /*
 178  * In the LP64 compilation environment, map large file interfaces
 179  * back to native versions where possible.
 180  */
 181 #ifdef __PRAGMA_REDEFINE_EXTNAME
 182 #pragma redefine_extname        statvfs64       statvfs
 183 #pragma redefine_extname        fstatvfs64      fstatvfs
 184 #else
 185 #define statvfs64_t             statvfs_t
 186 #define statvfs64               statvfs
 187 #define fstatvfs64              fstatvfs
 188 #endif
 189 #endif  /* _LP64 && _LARGEFILE64_SOURCE */
 190 
 191 #if defined(__STDC__)
 192 int statvfs(const char *_RESTRICT_KYWD, statvfs_t *_RESTRICT_KYWD);
 193 int fstatvfs(int, statvfs_t *);
 194 
 195 /* transitional large file interface versions */
 196 #if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 197             !defined(__PRAGMA_REDEFINE_EXTNAME))
 198 int statvfs64(const char *_RESTRICT_KYWD, statvfs64_t *_RESTRICT_KYWD);
 199 int fstatvfs64(int, statvfs64_t *);
 200 #endif  /* _LARGEFILE64_SOURCE... */
 201 #endif  /* defined(__STDC__) */
 202 #endif  /* !defined(_KERNEL) */
 203 
 204 #ifdef  __cplusplus
 205 }
 206 #endif
 207 
 208 #endif  /* _SYS_STATVFS_H */


   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  23 /*        All Rights Reserved   */
  24 

  25 /*
  26  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  27  *
  28  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  29  * Use is subject to license terms.
  30  */
  31 
  32 #ifndef _SYS_STATVFS_H
  33 #define _SYS_STATVFS_H
  34 


  35 #include <sys/feature_tests.h>
  36 #include <sys/types.h>
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 /*
  43  * Structure returned by statvfs(2).
  44  */
  45 
  46 #define _FSTYPSZ        16
  47 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  48 #ifndef FSTYPSZ
  49 #define FSTYPSZ _FSTYPSZ
  50 #endif
  51 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
  52 
  53 typedef struct statvfs {
  54         unsigned long   f_bsize;        /* fundamental file system block size */


 170 #define statvfs                 statvfs64
 171 #define fstatvfs                fstatvfs64
 172 #endif
 173 #endif  /* !_LP64 && _FILE_OFFSET_BITS == 64 */
 174 
 175 #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
 176 /*
 177  * In the LP64 compilation environment, map large file interfaces
 178  * back to native versions where possible.
 179  */
 180 #ifdef __PRAGMA_REDEFINE_EXTNAME
 181 #pragma redefine_extname        statvfs64       statvfs
 182 #pragma redefine_extname        fstatvfs64      fstatvfs
 183 #else
 184 #define statvfs64_t             statvfs_t
 185 #define statvfs64               statvfs
 186 #define fstatvfs64              fstatvfs
 187 #endif
 188 #endif  /* _LP64 && _LARGEFILE64_SOURCE */
 189 

 190 int statvfs(const char *_RESTRICT_KYWD, statvfs_t *_RESTRICT_KYWD);
 191 int fstatvfs(int, statvfs_t *);
 192 
 193 /* transitional large file interface versions */
 194 #if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 195             !defined(__PRAGMA_REDEFINE_EXTNAME))
 196 int statvfs64(const char *_RESTRICT_KYWD, statvfs64_t *_RESTRICT_KYWD);
 197 int fstatvfs64(int, statvfs64_t *);
 198 #endif  /* _LARGEFILE64_SOURCE... */

 199 #endif  /* !defined(_KERNEL) */
 200 
 201 #ifdef  __cplusplus
 202 }
 203 #endif
 204 
 205 #endif  /* _SYS_STATVFS_H */