Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/ftw.h
          +++ new/usr/src/head/ftw.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       23 + *
  22   24   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   */
  25   27  
  26   28  /*      Copyright (c) 1988 AT&T */
  27   29  /*        All Rights Reserved   */
  28   30  
  29   31  
  30   32  #ifndef _FTW_H
  31   33  #define _FTW_H
  32   34  
  33      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  34      -
  35   35  #include <sys/feature_tests.h>
  36   36  
  37   37  #include <sys/types.h>
  38   38  #include <sys/stat.h>
  39   39  
  40   40  #ifdef  __cplusplus
  41   41  extern "C" {
  42   42  #endif
  43   43  
  44   44  /*
↓ open down ↓ 70 lines elided ↑ open up ↑
 115  115  #endif
 116  116  #else   /* __PRAGMA_REDEFINE_EXTNAME */
 117  117  #define _xftw64         _xftw
 118  118  #define _ftw64          _ftw
 119  119  #if !defined(_XOPEN_SOURCE) || defined(_XPG5)
 120  120  #define nftw64          nftw
 121  121  #endif
 122  122  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 123  123  #endif  /* _LP64 && _LARGEFILE64_SOURCE */
 124  124  
 125      -#if defined(__STDC__)
 126      -
 127  125  extern int ftw(const char *,
 128  126          int (*)(const char *, const struct stat *, int), int);
 129  127  extern int _xftw(int, const char *,
 130  128          int (*)(const char *, const struct stat *, int), int);
 131  129  #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || defined(_XPG4_2)
 132  130  extern int nftw(const char *,
 133  131          int (*)(const char *, const struct stat *, int, struct FTW *),
 134  132          int, int);
 135  133  #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) ... */
 136  134  
↓ open down ↓ 6 lines elided ↑ open up ↑
 143  141          int (*)(const char *, const struct stat64 *, int), int);
 144  142  extern int _xftw64(int, const char *,
 145  143          int (*)(const char *, const struct stat64 *, int), int);
 146  144  #if !defined(_XOPEN_SOURCE)
 147  145  extern int nftw64(const char *,
 148  146          int (*)(const char *, const struct stat64 *, int, struct FTW *),
 149  147          int, int);
 150  148  #endif /* !defined(_XOPEN_SOURCE) */
 151  149  #endif /* _LARGEFILE64_SOURCE .. */
 152  150  
 153      -#else /* __STDC__ */
 154      -
 155      -extern int ftw(), _xftw();
 156      -
 157      -#if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || defined(_XPG4_2)
 158      -extern int nftw();
 159      -#endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) ... */
 160      -
 161      -/* transitional large file interface versions */
 162      -#if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 163      -            !defined(__PRAGMA_REDEFINE_EXTNAME))
 164      -extern int ftw64();
 165      -extern int _xftw64();
 166      -#if !defined(_XOPEN_SOURCE)
 167      -extern int nftw64();
 168      -#endif /* !defined(_XOPEN_SOURCE) */
 169      -#endif /* _LARGEFILE64_SOURCE .. */
 170      -
 171      -#endif /* __STDC__ */
 172      -
 173  151  #define _XFTWVER        2       /* version of file tree walk */
 174  152  
 175  153  #define ftw(path, fn, depth)    _xftw(_XFTWVER, (path), (fn), (depth))
 176  154  
 177  155  #if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 178  156              !defined(__PRAGMA_REDEFINE_EXTNAME))
 179  157  #define ftw64(path, fn, depth)  _xftw64(_XFTWVER, (path), (fn), (depth))
 180  158  #endif
 181  159  
 182  160  #ifdef  __cplusplus
 183  161  }
 184  162  #endif
 185  163  
 186  164  #endif  /* _FTW_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX