1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 28*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #ifndef _DIRENT_H 32*7c478bd9Sstevel@tonic-gate #define _DIRENT_H 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.5 */ 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #include <sys/feature_tests.h> 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 39*7c478bd9Sstevel@tonic-gate #include <sys/dirent.h> 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 42*7c478bd9Sstevel@tonic-gate extern "C" { 43*7c478bd9Sstevel@tonic-gate #endif 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate #define MAXNAMLEN 512 /* maximum filename length */ 48*7c478bd9Sstevel@tonic-gate #define DIRBUF 8192 /* buffer size for fs-indep. dirs */ 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */ 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate #if !defined(__XOPEN_OR_POSIX) 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate typedef struct { 55*7c478bd9Sstevel@tonic-gate int dd_fd; /* file descriptor */ 56*7c478bd9Sstevel@tonic-gate int dd_loc; /* offset in block */ 57*7c478bd9Sstevel@tonic-gate int dd_size; /* amount of valid data */ 58*7c478bd9Sstevel@tonic-gate char *dd_buf; /* directory block */ 59*7c478bd9Sstevel@tonic-gate } DIR; /* stream data from opendir() */ 60*7c478bd9Sstevel@tonic-gate 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate #else 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate typedef struct { 65*7c478bd9Sstevel@tonic-gate int d_fd; /* file descriptor */ 66*7c478bd9Sstevel@tonic-gate int d_loc; /* offset in block */ 67*7c478bd9Sstevel@tonic-gate int d_size; /* amount of valid data */ 68*7c478bd9Sstevel@tonic-gate char *d_buf; /* directory block */ 69*7c478bd9Sstevel@tonic-gate } DIR; /* stream data from opendir() */ 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate #endif /* !defined(__XOPEN_OR_POSIX) */ 72*7c478bd9Sstevel@tonic-gate 73*7c478bd9Sstevel@tonic-gate #if defined(__STDC__) 74*7c478bd9Sstevel@tonic-gate 75*7c478bd9Sstevel@tonic-gate /* large file compilation environment setup */ 76*7c478bd9Sstevel@tonic-gate #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 77*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 78*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir readdir64 79*7c478bd9Sstevel@tonic-gate #pragma redefine_extname scandir scandir64 80*7c478bd9Sstevel@tonic-gate #pragma redefine_extname alphasort alphasort64 81*7c478bd9Sstevel@tonic-gate #else 82*7c478bd9Sstevel@tonic-gate #define readdir readdir64 83*7c478bd9Sstevel@tonic-gate #define scandir scandir64 84*7c478bd9Sstevel@tonic-gate #define alphasort alphasort64 85*7c478bd9Sstevel@tonic-gate #endif 86*7c478bd9Sstevel@tonic-gate #endif /* _FILE_OFFSET_BITS == 64 */ 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gate /* In the LP64 compilation environment, all APIs are already large file */ 89*7c478bd9Sstevel@tonic-gate #if defined(_LP64) && defined(_LARGEFILE64_SOURCE) 90*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 91*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir64 readdir 92*7c478bd9Sstevel@tonic-gate #pragma redefine_extname scandir64 scandir 93*7c478bd9Sstevel@tonic-gate #pragma redefine_extname alphasort64 alphasort 94*7c478bd9Sstevel@tonic-gate #else 95*7c478bd9Sstevel@tonic-gate #define readdir64 readdir 96*7c478bd9Sstevel@tonic-gate #define scandir64 scandir 97*7c478bd9Sstevel@tonic-gate #define alphsort64 alphasort 98*7c478bd9Sstevel@tonic-gate #endif 99*7c478bd9Sstevel@tonic-gate #endif /* _LP64 && _LARGEFILE64_SOURCE */ 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate extern DIR *opendir(const char *); 102*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 103*7c478bd9Sstevel@tonic-gate defined(_ATFILE_SOURCE) 104*7c478bd9Sstevel@tonic-gate extern DIR *fdopendir(int); 105*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 106*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 107*7c478bd9Sstevel@tonic-gate extern int scandir(const char *, struct dirent *(*[]), 108*7c478bd9Sstevel@tonic-gate int (*)(const struct dirent *), 109*7c478bd9Sstevel@tonic-gate int (*)(const struct dirent **, 110*7c478bd9Sstevel@tonic-gate const struct dirent **)); 111*7c478bd9Sstevel@tonic-gate extern int alphasort(const struct dirent **, 112*7c478bd9Sstevel@tonic-gate const struct dirent **); 113*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */ 114*7c478bd9Sstevel@tonic-gate extern struct dirent *readdir(DIR *); 115*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \ 116*7c478bd9Sstevel@tonic-gate defined(_XOPEN_SOURCE) 117*7c478bd9Sstevel@tonic-gate extern long telldir(DIR *); 118*7c478bd9Sstevel@tonic-gate extern void seekdir(DIR *, long); 119*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */ 120*7c478bd9Sstevel@tonic-gate extern void rewinddir(DIR *); 121*7c478bd9Sstevel@tonic-gate extern int closedir(DIR *); 122*7c478bd9Sstevel@tonic-gate 123*7c478bd9Sstevel@tonic-gate /* transitional large file interface */ 124*7c478bd9Sstevel@tonic-gate #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 125*7c478bd9Sstevel@tonic-gate !defined(__PRAGMA_REDEFINE_EXTNAME)) 126*7c478bd9Sstevel@tonic-gate extern struct dirent64 *readdir64(DIR *); 127*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 128*7c478bd9Sstevel@tonic-gate extern int scandir64(const char *, struct dirent64 *(*[]), 129*7c478bd9Sstevel@tonic-gate int (*)(const struct dirent64 *), 130*7c478bd9Sstevel@tonic-gate int (*)(const struct dirent64 **, 131*7c478bd9Sstevel@tonic-gate const struct dirent64 **)); 132*7c478bd9Sstevel@tonic-gate extern int alphasort64(const struct dirent64 **, const struct dirent64 **); 133*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */ 134*7c478bd9Sstevel@tonic-gate #endif 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gate #else 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate extern DIR *opendir(); 139*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 140*7c478bd9Sstevel@tonic-gate defined(_ATFILE_SOURCE) 141*7c478bd9Sstevel@tonic-gate extern DIR *fdopendir(); 142*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 143*7c478bd9Sstevel@tonic-gate extern struct dirent *readdir(); 144*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \ 145*7c478bd9Sstevel@tonic-gate defined(_XOPEN_SOURCE) 146*7c478bd9Sstevel@tonic-gate extern long telldir(); 147*7c478bd9Sstevel@tonic-gate extern void seekdir(); 148*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */ 149*7c478bd9Sstevel@tonic-gate extern void rewinddir(); 150*7c478bd9Sstevel@tonic-gate extern int closedir(); 151*7c478bd9Sstevel@tonic-gate 152*7c478bd9Sstevel@tonic-gate /* transitional large file interface */ 153*7c478bd9Sstevel@tonic-gate #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 154*7c478bd9Sstevel@tonic-gate !defined(__PRAGMA_REDEFINE_EXTNAME)) 155*7c478bd9Sstevel@tonic-gate extern struct dirent64 *readdir64(); 156*7c478bd9Sstevel@tonic-gate #endif 157*7c478bd9Sstevel@tonic-gate 158*7c478bd9Sstevel@tonic-gate #endif 159*7c478bd9Sstevel@tonic-gate 160*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \ 161*7c478bd9Sstevel@tonic-gate defined(_XOPEN_SOURCE) 162*7c478bd9Sstevel@tonic-gate #define rewinddir(dirp) seekdir(dirp, 0L) 163*7c478bd9Sstevel@tonic-gate #endif 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate /* 166*7c478bd9Sstevel@tonic-gate * readdir_r() prototype is defined here. 167*7c478bd9Sstevel@tonic-gate * 168*7c478bd9Sstevel@tonic-gate * There are several variations, depending on whether compatibility with old 169*7c478bd9Sstevel@tonic-gate * POSIX draft specifications or the final specification is desired and on 170*7c478bd9Sstevel@tonic-gate * whether the large file compilation environment is active. To combat a 171*7c478bd9Sstevel@tonic-gate * combinatorial explosion, enabling large files implies using the final 172*7c478bd9Sstevel@tonic-gate * specification (since the definition of the large file environment 173*7c478bd9Sstevel@tonic-gate * considerably postdates that of the final readdir_r specification). 174*7c478bd9Sstevel@tonic-gate * 175*7c478bd9Sstevel@tonic-gate * In the LP64 compilation environment, all APIs are already large file, 176*7c478bd9Sstevel@tonic-gate * and since there are no 64-bit applications that can have seen the 177*7c478bd9Sstevel@tonic-gate * draft implementation, again, we use the final POSIX specification. 178*7c478bd9Sstevel@tonic-gate */ 179*7c478bd9Sstevel@tonic-gate 180*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || defined(_REENTRANT) || \ 181*7c478bd9Sstevel@tonic-gate !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ 182*7c478bd9Sstevel@tonic-gate defined(_POSIX_PTHREAD_SEMANTICS) 183*7c478bd9Sstevel@tonic-gate 184*7c478bd9Sstevel@tonic-gate #if defined(__STDC__) 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate #if !defined(_LP64) && _FILE_OFFSET_BITS == 32 187*7c478bd9Sstevel@tonic-gate 188*7c478bd9Sstevel@tonic-gate #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) 189*7c478bd9Sstevel@tonic-gate 190*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 191*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir_r __posix_readdir_r 192*7c478bd9Sstevel@tonic-gate extern int readdir_r(DIR *_RESTRICT_KYWD, struct dirent *_RESTRICT_KYWD, 193*7c478bd9Sstevel@tonic-gate struct dirent **_RESTRICT_KYWD); 194*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 195*7c478bd9Sstevel@tonic-gate 196*7c478bd9Sstevel@tonic-gate extern int __posix_readdir_r(DIR *_RESTRICT_KYWD, 197*7c478bd9Sstevel@tonic-gate struct dirent *_RESTRICT_KYWD, struct dirent **_RESTRICT_KYWD); 198*7c478bd9Sstevel@tonic-gate 199*7c478bd9Sstevel@tonic-gate #ifdef __lint 200*7c478bd9Sstevel@tonic-gate #define readdir_r __posix_readdir_r 201*7c478bd9Sstevel@tonic-gate #else /* !__lint */ 202*7c478bd9Sstevel@tonic-gate 203*7c478bd9Sstevel@tonic-gate static int 204*7c478bd9Sstevel@tonic-gate readdir_r(DIR *_RESTRICT_KYWD __dp, struct dirent *_RESTRICT_KYWD __ent, 205*7c478bd9Sstevel@tonic-gate struct dirent **_RESTRICT_KYWD __res) { 206*7c478bd9Sstevel@tonic-gate return (__posix_readdir_r(__dp, __ent, __res)); 207*7c478bd9Sstevel@tonic-gate } 208*7c478bd9Sstevel@tonic-gate 209*7c478bd9Sstevel@tonic-gate #endif /* !__lint */ 210*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 211*7c478bd9Sstevel@tonic-gate 212*7c478bd9Sstevel@tonic-gate #else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ 213*7c478bd9Sstevel@tonic-gate 214*7c478bd9Sstevel@tonic-gate extern struct dirent *readdir_r(DIR *__dp, struct dirent *__ent); 215*7c478bd9Sstevel@tonic-gate 216*7c478bd9Sstevel@tonic-gate #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ 217*7c478bd9Sstevel@tonic-gate 218*7c478bd9Sstevel@tonic-gate #else /* !_LP64 && _FILE_OFFSET_BITS == 32 */ 219*7c478bd9Sstevel@tonic-gate 220*7c478bd9Sstevel@tonic-gate #if defined(_LP64) 221*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 222*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir64_r readdir_r 223*7c478bd9Sstevel@tonic-gate #else 224*7c478bd9Sstevel@tonic-gate #define readdir64_r readdir_r 225*7c478bd9Sstevel@tonic-gate #endif 226*7c478bd9Sstevel@tonic-gate #else /* _LP64 */ 227*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 228*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir_r readdir64_r 229*7c478bd9Sstevel@tonic-gate #else 230*7c478bd9Sstevel@tonic-gate #define readdir_r readdir64_r 231*7c478bd9Sstevel@tonic-gate #endif 232*7c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 233*7c478bd9Sstevel@tonic-gate extern int readdir_r(DIR *_RESTRICT_KYWD, struct dirent *_RESTRICT_KYWD, 234*7c478bd9Sstevel@tonic-gate struct dirent **_RESTRICT_KYWD); 235*7c478bd9Sstevel@tonic-gate 236*7c478bd9Sstevel@tonic-gate #endif /* !_LP64 && _FILE_OFFSET_BITS == 32 */ 237*7c478bd9Sstevel@tonic-gate 238*7c478bd9Sstevel@tonic-gate #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 239*7c478bd9Sstevel@tonic-gate !defined(__PRAGMA_REDEFINE_EXTNAME)) 240*7c478bd9Sstevel@tonic-gate /* transitional large file interface */ 241*7c478bd9Sstevel@tonic-gate extern int readdir64_r(DIR *_RESTRICT_KYWD, struct dirent64 *_RESTRICT_KYWD, 242*7c478bd9Sstevel@tonic-gate struct dirent64 **_RESTRICT_KYWD); 243*7c478bd9Sstevel@tonic-gate #endif 244*7c478bd9Sstevel@tonic-gate 245*7c478bd9Sstevel@tonic-gate #else /* __STDC__ */ 246*7c478bd9Sstevel@tonic-gate 247*7c478bd9Sstevel@tonic-gate #if !defined(_LP64) && _FILE_OFFSET_BITS == 32 248*7c478bd9Sstevel@tonic-gate 249*7c478bd9Sstevel@tonic-gate #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) 250*7c478bd9Sstevel@tonic-gate 251*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 252*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir_r __posix_readdir_r 253*7c478bd9Sstevel@tonic-gate extern int readdir_r(); 254*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 255*7c478bd9Sstevel@tonic-gate 256*7c478bd9Sstevel@tonic-gate extern int __posix_readdir_r(); 257*7c478bd9Sstevel@tonic-gate 258*7c478bd9Sstevel@tonic-gate #ifdef __lint 259*7c478bd9Sstevel@tonic-gate #define readdir_r __posix_readdir_r 260*7c478bd9Sstevel@tonic-gate #else /* !__lint */ 261*7c478bd9Sstevel@tonic-gate 262*7c478bd9Sstevel@tonic-gate static int 263*7c478bd9Sstevel@tonic-gate readdir_r(DIR *_RESTRICT_KYWD __dp, struct dirent *_RESTRICT_KYWD __ent, 264*7c478bd9Sstevel@tonic-gate struct dirent **_RESTRICT_KYWD __res) 265*7c478bd9Sstevel@tonic-gate { 266*7c478bd9Sstevel@tonic-gate return (__posix_readdir_r(__dp, __ent, __res)); 267*7c478bd9Sstevel@tonic-gate } 268*7c478bd9Sstevel@tonic-gate 269*7c478bd9Sstevel@tonic-gate #endif /* !__lint */ 270*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 271*7c478bd9Sstevel@tonic-gate 272*7c478bd9Sstevel@tonic-gate #else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ 273*7c478bd9Sstevel@tonic-gate 274*7c478bd9Sstevel@tonic-gate extern struct dirent *readdir_r(); 275*7c478bd9Sstevel@tonic-gate 276*7c478bd9Sstevel@tonic-gate #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ 277*7c478bd9Sstevel@tonic-gate 278*7c478bd9Sstevel@tonic-gate #else /* !_LP64 && _FILE_OFFSET_BITS == 32 */ 279*7c478bd9Sstevel@tonic-gate 280*7c478bd9Sstevel@tonic-gate #if defined(_LP64) 281*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 282*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir64_r readdir_r 283*7c478bd9Sstevel@tonic-gate #else 284*7c478bd9Sstevel@tonic-gate #define readdir64_r readdir 285*7c478bd9Sstevel@tonic-gate #endif 286*7c478bd9Sstevel@tonic-gate #else /* _LP64 */ 287*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 288*7c478bd9Sstevel@tonic-gate #pragma redefine_extname readdir_r readdir64_r 289*7c478bd9Sstevel@tonic-gate #else 290*7c478bd9Sstevel@tonic-gate #define readdir_r readdir64_r 291*7c478bd9Sstevel@tonic-gate #endif 292*7c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 293*7c478bd9Sstevel@tonic-gate extern int readdir_r(); 294*7c478bd9Sstevel@tonic-gate 295*7c478bd9Sstevel@tonic-gate #endif /* !_LP64 && _FILE_OFFSET_BITS == 32 */ 296*7c478bd9Sstevel@tonic-gate 297*7c478bd9Sstevel@tonic-gate #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 298*7c478bd9Sstevel@tonic-gate !defined(__PRAGMA_REDEFINE_EXTNAME)) 299*7c478bd9Sstevel@tonic-gate /* transitional large file interface */ 300*7c478bd9Sstevel@tonic-gate extern int readdir64_r(); 301*7c478bd9Sstevel@tonic-gate #endif 302*7c478bd9Sstevel@tonic-gate 303*7c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 304*7c478bd9Sstevel@tonic-gate 305*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */ 306*7c478bd9Sstevel@tonic-gate 307*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 308*7c478bd9Sstevel@tonic-gate } 309*7c478bd9Sstevel@tonic-gate #endif 310*7c478bd9Sstevel@tonic-gate 311*7c478bd9Sstevel@tonic-gate #endif /* _DIRENT_H */ 312