[OpenVMS, C] Getting the list of DECC logicals DECC$SHR supports

PRODUCT: HP C for OpenVMS
OP/SYS: OpenVMS Alpha/IA64 Version 8.3 and above
COMPONENT: DECC$ Logicals
SOURCE: Philippe Vouters Fontainebleau/France
HIGH QUALITY SUPPORT: http://vouters.dyndns.org
OVERVIEW: This article in the PROGRAM section shows a small HP C for OpenVMS code that enables to display all the DECC$ logicals that the HP C for OpenVMS run-time supports along with their current setting.
*** CAUTION *** This sample program has been tested using HP C V7.3-018 on OpenVMS IA64 V8.3-1H1. However, we cannot guarantee its effectiveness because of the possibility of error in transmitting or implementing it. It is meant to be used as a template for writing your own program, and may require modification for use on your system.
PROGRAM NOTES: To compile, link and run the program, use: $ CC TEST $ LINK TEST $ RUN TEST Program output: -------------- $ run test ** C RTL Feature settings ---------- C RTL Feature Name ---------- Cur Def Min Max Ini DECC$FIXED_LENGTH_SEEK_TO_EOF 0 0 0 1 -1 DECC$POSIX_SEEK_STREAM_FILE 0 0 0 1 -1 DECC$SELECT_IGNORES_INVALID_FD 0 0 0 1 -1 DECC$STRTOL_ERANGE 0 0 0 1 -1 DECC$VALIDATE_SIGNAL_IN_KILL 0 0 0 1 -1 DECC$WRITE_SHORT_RECORDS 0 0 0 1 -1 DECC$ARGV_PARSE_STYLE 0 0 0 1 -1 DECC$EFS_CASE_PRESERVE 1 0 0 2 1 DECC$PIPE_BUFFER_SIZE 512 512 512 65024 -1 DECC$PIPE_BUFFER_QUOTA -1 -1 512 2147483647 -1 DECC$STDIO_CTX_EOL 0 0 0 1 -1 DECC$USE_RAB64 0 0 0 1 -1 DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION 0 0 0 1 -1 DECC$EFS_CHARSET 0 0 0 1 -1 DECC$FILENAME_UNIX_NO_VERSION 0 0 0 1 -1 DECC$FILENAME_UNIX_REPORT 0 0 0 1 -1 DECC$READDIR_DROPDOTNOTYPE 0 0 0 1 -1 DECC$RENAME_NO_INHERIT 0 0 0 1 -1 DECC$GLOB_UNIX_STYLE 0 0 0 1 -1 DECC$EFS_FILE_TIMESTAMPS 0 0 0 1 -1 DECC$EXEC_FILEATTR_INHERITANCE 0 0 0 2 -1 DECC$FILE_OWNER_UNIX 0 0 0 1 -1 DECC$FILE_PERMISSION_UNIX 0 0 0 1 -1 DECC$FILE_SHARING 0 0 0 1 -1 DECC$FILENAME_UNIX_ONLY 0 0 0 2 -1 DECC$POSIX_STYLE_UID 0 0 0 1 -1 DECC$USE_JPI$_CREATOR 0 0 0 1 -1 DECC$DETACHED_CHILD_PROCESS 0 0 0 1 -1 DECC$ALLOW_REMOVE_OPEN_FILES 0 0 0 1 -1 DECC$ENABLE_GETENV_CACHE 0 0 0 1 -1 DECC$ENABLE_TO_VMS_LOGNAME_CACHE 0 0 -1 3600 -1 DECC$EFS_NO_DOTS_IN_DIRNAME 0 0 0 1 -1 DECC$TZ_CACHE_SIZE 2 2 0 500 -1 DECC$UMASK 0 0 0 511 -1 DECC$UNIX_LEVEL 0 0 0 100 -1 DECC$DEFAULT_LRL 32767 32767 0 32767 -1 DECC$DEFAULT_UDF_RECORD 0 0 0 1 -1 DECC$DISABLE_POSIX_ROOT 0 0 0 1 -1 DECC$EFS_CASE_SPECIAL 0 0 0 1 -1 DECC$LOCALE_CACHE_SIZE 0 0 0 357913941 -1 DECC$MAILBOX_CTX_STM 0 0 0 1 0 DECC$READDIR_KEEPDOTDIR 0 0 0 1 -1 DECC$THREAD_DATA_AST_SAFE 0 0 0 1 -1 DECC$V62_RECORD_GENERATION 0 0 0 1 -1 DECC$XPG4_STRPTIME 0 0 0 1 -1 DECC$UNIX_PATH_BEFORE_LOGNAME 0 0 0 1 -1 DECC$TRACE 0 0 0 3 -1 DECC$FD_LOCKING 1 0 0 1 1 DECC$ALLOW_UNPRIVILEGED_NICE 0 0 0 1 -1 DECC$NO_ROOTED_SEARCH_LISTS 0 0 0 1 -1 DECC$ACL_ACCESS_CHECK 0 0 0 1 -1 DECC$GLOB_VMS_STYLE 0 0 0 1 -1 DECC$WLS 0 0 0 1 -1 DECC$RENAME_ALLOW_DIR 0 0 0 1 -1 DECC$MPROTECT_REQUIRES_MMAP 0 0 0 1 -1 DECC$POPEN_NO_CRLF_REC_ATTR 0 0 0 1 -1 DECC$FP_LOCKING_DISABLE 0 0 0 1 -1 DECC$STREAM_PIPE 0 0 0 1 -1 DECC$SYMLINKS 1 1 0 1 -1 DECC$COMMON_STDERR_STDOUT 0 0 0 1 -1 DECC$POSIX_COMPLIANT_PATHNAMES 0 0 0 4 -1 DECC$POSIX_COMPLIANT_VERSIONS 0 0 0 1 -1 DECC$MUNMAP_DELETE 0 0 0 1 -1 DECC$FWRITE_UNBUFFERED 0 0 0 1 -1 DECC$FILE_WORLD_DELETE 0 0 0 1 -1 DECC$SSIO 0 0 0 1 -1 DECC$SSIO_FOC 0 0 0 1 -1 DECC$EXIT_AFTER_FAILED_EXEC 0 0 0 1 -1 DECC$SETVBUF_BUFFERED 0 0 0 1 -1 DECC$PRINTF_USES_VAX_ROUND 0 0 0 1 -1 DECC$TERM_REC_CRLF 0 0 0 1 -1 DECC$VFC_CR_NOCF 0 0 0 1 -1 ** C RTL features that cannot be set by API ---------- C RTL Feature Name ---------- Cur Def Min Max Ini DECC$EFS_PRESERVE_CASE 1 0 0 2 1 DECC$DISABLE_RTL_TRACING 0 0 0 1 0 $ cc/version HP C V7.2-022 on OpenVMS IA64 V8.3-1H1 $ analyze/image/inter sys$share:decc$shr.exe This is an OpenVMS IA64 (Elf format) shareable image file Image Identification Information, in section 8. Image name: "DECC$SHR" Global Symbol Table name: "DECC$SHR" Image file identification: "V8.3-01" Image build identification: "0090090014" Link identification: "Linker T02-28" Link Date/Time: 14-NOV-2008 08:03:09.24 Press RETURN to continue, or enter a period (.) for next file:
PROGRAM: ******** * test.c ******** #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unixlib.h> int main(){ if (decc$feature_show_all() == -1){ fprintf (stderr,"decc$feature_show_all error: %s\n",strerror(errno)); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); return 1; } About DECC$EFS_CASE_PRESERVE, DECC$EFS_CASE_SPECIAL and DECC$EFS_PRESERVE_CASE: ------------------------------------------------------------------------------ This paragrah assumes that DECC$EFS_CASE_SPECIAL is disabled (the dault). If DECC$EFS_CASE_PRESERVE contains 0 (the default), filenames are returned in lowercase. If its value is 1, filenames are returned as is preserving exact case. If 2 and the filename contains mixed case characters, the filename is returned as is; if the filename contains all lower or all uppercase characters, it is returned in lowercase characters. If DECC$EFS_CASE_PRESERVE contains 1 and DECC$EFS_CASE_SPECIAL contains 1, the result is the same as DECC$EFS_CASE_PRESERVE set to 2. When DECC$EFS_CASE_PRESERVE is disabled, UNIX-style file names are always reported in lowercase unless feature DECC$EFS_CASE_SPECIAL is enabled. Initially in VMS V72 on Alpha, the both logicals were boolean as shown below: DEFINE DECC$EFS_CASE_PRESERVE {ENABLE,DISABLE} DEFINE DECC$EFS_CASE_SPECIAL {ENABLE,DISABLE} Later the logical DECC$EFS_CASE_PRESERVE was modified to accept multiple values for the POSIX complainant modification in the CRTL and the logical DECC$EFS_CASE_SPECIAL was retained for the backward compatibility. Mostly people were using both logical with {ENABLE, DISABLE} switch, it was decided to retain logical in the later releases.
REFERENCE(S): For detailed information on possible DECC$ logicals, refer to the HP C Run-Time Library Reference Manual for OpenVMS Systems at: http://h71000.www7.hp.com/doc/732final/5763/5763pro_004.html http://h71000.www7.hp.com/doc/732final/5763/5763pro_005.html http://h71000.www7.hp.com/doc/732final/5763/5763pro_006.html For DECC$EFS_CASE_PRESERVE, DECC$EFS_CASE_SPECIAL and DECC$EFS_PRESERVE_CASE logicals, mail exchanges with HP.
Did you find this helpful?