1 #if defined( __VMS) && !defined( OPENSSL_NO_DECC_INIT) && \
2 defined( __DECC) && !defined( __VAX) && (__CRTL_VER >= 70301000)
3 # define USE_DECC_INIT 1
30 int decc_init_done = -1;
46 decc_feat_t decc_feat_array[] =
49 {
"DECC$ARGV_PARSE_STYLE", 1 },
52 {
"DECC$EFS_CASE_PRESERVE", 1 },
57 {
"DECC$EFS_CHARSET", 1 },
66 static void decc_init(
void)
68 char *openssl_debug_decc_init;
78 openssl_debug_decc_init = getenv(
"OPENSSL_DEBUG_DECC_INIT");
79 if (openssl_debug_decc_init != NULL)
81 verbose = strtol( openssl_debug_decc_init, NULL, 10);
93 for (i = 0; decc_feat_array[ i].name != NULL; i++)
96 feat_index = decc$feature_get_index( decc_feat_array[ i].name);
100 feat_value = decc$feature_get_value( feat_index, 1);
101 feat_value_min = decc$feature_get_value( feat_index, 2);
102 feat_value_max = decc$feature_get_value( feat_index, 3);
105 if ((decc_feat_array[ i].value >= feat_value_min) &&
106 (decc_feat_array[ i].value <= feat_value_max))
109 if (feat_value != decc_feat_array[ i].value)
111 sts = decc$feature_set_value( feat_index,
113 decc_feat_array[ i].value);
117 fprintf( stderr,
" %s = %d, sts = %d.\n",
118 decc_feat_array[ i].name,
119 decc_feat_array[ i].value,
128 " INVALID DECC$FEATURE VALUE, %d: %d <= %s <= %d.\n",
130 feat_value_min, decc_feat_array[ i].name, feat_value_max);
137 " UNKNOWN DECC$FEATURE: %s.\n", decc_feat_array[ i].name);
143 fprintf( stderr,
" DECC_INIT complete.\n");
154 #pragma extern_model save
156 #if __INITIAL_POINTER_SIZE == 64
157 # define PSECT_ALIGN 3
159 # define PSECT_ALIGN 2
162 #pragma extern_model strict_refdef "LIB$INITIALIZ" PSECT_ALIGN, nopic, nowrt
163 const int spare[ 8] = { 0 };
165 #pragma extern_model strict_refdef "LIB$INITIALIZE" PSECT_ALIGN, nopic, nowrt
166 void (*
const x_decc_init)() = decc_init;
168 #pragma extern_model restore
172 #pragma extern_model save
174 int LIB$INITIALIZE(
void);
176 #pragma extern_model strict_refdef
177 int dmy_lib$initialize = (int) LIB$INITIALIZE;
179 #pragma extern_model restore