#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. ** **************************************************************************** ** ** ** HPE CONFIDENTIAL. This software is confidential proprietary software ** ** licensed by Hewlett Packard Enterprise Development, LP, and is not ** ** authorized to be used, duplicated or disclosed to anyone without the ** ** prior written permission of HPE. ** ** Copyright 2004 Hewlett Packard Enterprise Development, LP ** ** ** ** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential ** ** proprietary software licensed by VMS Software, Inc., and is not ** ** authorized to be used, duplicated or disclosed to anyone without ** ** the prior written permission of VMS Software, Inc. ** ** Copyright 2022-2023 VMS Software, Inc. ** ** ** ***************************************************************************/ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif /* ** Save the users pointer context */ #if __INITIAL_POINTER_SIZE || defined(__clang__) # pragma __required_pointer_size __save # pragma __required_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. ** Next, we allow the use of 64-bit pointers in function calls. */ #if __INITIAL_POINTER_SIZE || defined(__clang__) # pragma __required_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 # if defined(__clang__) # define ftw __non_utc_ftw # else # define ftw(__p1,__p2,__p3) __non_utc_ftw(__p1,__p2,__p3) # endif # 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 || defined(__clang__) # pragma __required_pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __FTW_LOADED */