#ifndef __FTW_LOADED #define __FTW_LOADED /**************************************************************************** ** ** - walk a file tree ** ***************************************************************************** ** ** Header introduced by the X/Open CAE Specification, Issue 4 ** ** Definitions in this header file may not be available on all versions of ** OpenVMS. See the DEC C Runtime Library reference manual for specifics. ** ***************************************************************************** ** ** Copyright 2004 Hewlett-Packard Development Company, L.P. ** ** Confidential computer software. Valid license from HP and/or ** its subsidiaries required for possession, use, or copying. ** ** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, ** Computer Software Documentation, and Technical Data for Commercial ** Items are licensed to the U.S. Government under vendor's standard ** commercial license. ** ** Neither HP nor any of its subsidiaries shall be liable for technical ** or editorial errors or omissions contained herein. The information ** in this document is provided "as is" without warranty of any kind and ** is subject to change without notice. The warranties for HP products ** are set forth in the express limited warranty statements accompanying ** such products. Nothing herein should be construed as constituting an ** additional warranty. ** ***************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif /* ** If the user has used /pointer_size=short or /pointer_size=long, we will ** begin in a 32-bit pointer size context. */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** All includes of other header files must be done prior to altering the ** pointer size mode. */ #include /* ** Define FTW constant values */ #define FTW_D 0 /* Directory */ #define FTW_DNR 1 /* Directory without read permission */ #define FTW_F 2 /* File */ #define FTW_NS 3 /* Unknown type, stat() failed */ #if defined _XOPEN_SOURCE_EXTENDED || !defined _XOPEN_SOURCE # define FTW_SL 4 /* symbolic link */ # define FTW_SLN 5 /* symbolic link names non-existant file */ #endif /* ** The callback routine for the ftw function is always passed 32 bit addresses. */ typedef int (* __ftw_callback)(const char *, const struct stat *, int); /* ** We are done defining things which must always be 32 bit pointers. If the ** user has used /pointer_size=32 or /pointer_size=64, we will allow 64 bit ** pointers to be used in function calls. */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size 64 #endif #if _USE_STD_STAT #pragma __extern_prefix __save #pragma __extern_prefix "__std_" #else #if __USE_OFF64_T # pragma __extern_prefix __save # if __USE_LONG_GID_T # pragma __extern_prefix "__off64_long_gid_" # elif !defined _VMS_V6_SOURCE # pragma __extern_prefix "__off64_" # else # pragma __extern_prefix "__off64_non_utc_" # endif #elif __USE_LONG_GID_T # pragma __extern_prefix __save # pragma __extern_prefix "__long_gid_" #elif ((__CRTL_VER >= 70301000) && (__CRTL_VER < 70311000) && defined(_VMS_V6_SOURCE)) \ || ((__CRTL_VER >= 70311000) && defined(_VMS_V6_SOURCE) && defined(__LOCAL_TIME_FTW)) # ifdef __CAN_USE_EXTERN_PREFIX # pragma __extern_prefix __save # pragma __extern_prefix "__non_utc_" # else # define ftw(__p1,__p2,__p3) __non_utc_ftw(__p1,__p2,__p3) # endif #endif /* __USE_OFF64_T */ #endif /* _USE_STD_STAT */ /* ** Function prototypes */ int ftw (const char * __path, __ftw_callback __action, int __depth); /* ** Disable extern_prefix if we enabled it earlier */ #if _USE_STD_STAT #pragma __extern_prefix __restore #else #if __USE_LONG_GID_T || __USE_OFF64_T # pragma __extern_prefix __restore #elif ((__CRTL_VER >= 70301000) && (__CRTL_VER < 70311000) && defined(_VMS_V6_SOURCE)) \ || ((__CRTL_VER >= 70311000) && defined(_VMS_V6_SOURCE) && defined(__LOCAL_TIME_FTW)) # ifdef __CAN_USE_EXTERN_PREFIX # pragma __extern_prefix __restore # endif #endif #endif /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __FTW_LOADED */