(file) Return to VMS_Crtl_Init.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Platforms / Vms

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2