1 karl 1.2 //%2005////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
7 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
11 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
18 //
19 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 karl 1.2 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
|
29 gs.keenan 1.1
30
31 #include <unixlib.h>
32 #include <stdio.h>
33 #include <errno.h>
34
35 int decc$feature_get_index(const char *name);
36 int decc$feature_set_value(int index, int mode, int value);
37
38 //
39 // Sets current value for a feature
40 //
41 static void set(char *name, int value)
42 {
43 int index;
44 errno = 0;
45
46 index = decc$feature_get_index(name);
47
48 if (index == -1 ||
49 (decc$feature_set_value(index, 1, value) == -1 &&
50 gs.keenan 1.1 errno != 0))
51 {
52 perror(name);
53 }
54 }
55
56 static void set_coe(void)
57 {
58 set ("DECC$ARGV_PARSE_STYLE", TRUE);
59 set ("DECC$FILE_SHARING", TRUE);
60 set ("DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION", TRUE);
61 set ("DECC$EFS_CASE_PRESERVE", TRUE);
62 set ("DECC$EFS_CHARSET", TRUE);
63 set ("DECC$EFS_FILE_TIMESTAMPS", TRUE);
64 set ("DECC$FILENAME_UNIX_NO_VERSION", TRUE);
65 set ("DECC$FILENAME_UNIX_REPORT", TRUE);
66 set ("DECC$FILE_OWNER_UNIX", TRUE);
67 set ("DECC$FILE_PERMISSION_UNIX", TRUE);
68 set ("DECC$READDIR_DROPDOTNOTYPE", TRUE);
69 set ("DECC$UMASK", 027);
70 }
71 gs.keenan 1.1
72
73 int LIB$INITIALIZE();
74
75 #pragma extern_model save
76 #pragma extern_model strict_refdef "LIB$INITIALIZ" nopic,con,rel,gbl,noshr,noexe,nowrt,novec,long
77 int spare[8] = {0};
78
79 #pragma extern_model strict_refdef "LIB$INITIALIZE" nopic,con,rel,gbl,noshr,noexe,nowrt,novec,long
80 void (*x_set_coe)() = set_coe;
81
82 #pragma extern_model restore
83
|