summaryrefslogtreecommitdiff
path: root/vms/vms.h
blob: 05f995bbd8baeee81ffdedd5975c03936a83609e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
 *    Various VMS-specific items.
 *
 *    Includes:
 *
 *  Emergency replacement for <utime.h> for VMS CRTL before V7.3.
 *
 *  Emergency replacement for <pwd.h> for VMS CRTL before V7.0.
 *
 *  Emergency substitution of stat() for lstat() for VAX and VMS CRTL
 *  before V7.3-1.
 *
 *  Prototypes for VMS-specific functions:
 *     acc_cb()
 *     utime() (CRTL < V7.3)
 *     ods_conform()
 *     set_ods5_dest()
 *     vms_arch()
 *     vms_vers()
 *
 *  Global storage:
 *     ods5_dest
 */

#ifndef __VMS_H_INCLUDED
#define __VMS_H_INCLUDED

/* Emergency replacement for <utime.h> for VMS before V7.3. */

#if __CRTL_VER < 70300000

#include <types.h>

/* The "utimbuf" structure is used by "utime()". */
struct utimbuf {
        time_t actime;          /* access time */
        time_t modtime;         /* modification time */
};

/* Function prototypes for utime(), */

int utime( const char *path, const struct utimbuf *times);

#else /* __CRTL_VER < 70300000 */

#include <utime.h>

#endif /* __CRTL_VER < 70300000 */


/* Emergency substitution of stat() for lstat() for VAX and VMS CRTL
   before V7.3-1.
*/
#if defined(__VAX) || __CRTL_VER < 70301000

#define lstat( __p1, __p2) stat( __p1, __p2)

#endif /* defined(__VAX) || __CRTL_VER < 70301000 */


/* Global storage. */

/*    VMS destination file system type.  < 0: unset/unknown
                                         = 0: ODS2
                                         > 0: ODS5
*/

extern int ods5_dest;


/* Function prototypes. */

extern int acc_cb();

char *ods_conform( char *path);

int set_ods5_dest( char *path);

char *vms_arch( void);

char *vms_vers( void);

/* Emergency replacement for <pwd.h> (for VMS CRTL before V7.0). */

/* Declare "passwd" structure, if needed. */

#ifndef HAVE_PWD_H

struct passwd {
        char    *pw_name;
        char    *pw_passwd;
        int     pw_uid;
        int     pw_gid;
        short   pw_salt;
        int     pw_encrypt;
        char    *pw_age;
        char    *pw_comment;
        char    *pw_gecos;
        char    *pw_dir;
        char    *pw_shell;
};

struct passwd *getpwuid();

#endif /* HAVE_PWD_H */

#endif /* __VMS_H_INCLUDED */