1 /* VMS 64bit crt0 returning VMS style condition codes .
2 Copyright (C) 2001 Free Software Foundation, Inc.
3 Contributed by Douglas B. Rupp (rupp@gnat.com).
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 In addition to the permissions in the GNU General Public License, the
13 Free Software Foundation gives you unlimited permission to link the
14 compiled version of this file into combinations with other programs,
15 and to distribute those combinations without any restriction coming
16 from the use of this file. (The General Public License restrictions
17 do apply in other respects; for example, they cover modification of
18 the file, and distribution when not linked into a combine
21 GCC is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
26 You should have received a copy of the GNU General Public License
27 along with GCC; see the file COPYING. If not, write to
28 the Free Software Foundation, 59 Temple Place - Suite 330,
29 Boston, MA 02111-1307, USA. */
32 You Lose
! This file can only be compiled with DEC C
.
35 /* This file can only be compiled with DEC C, due to the call to
36 lib$establish and the pragmas pointer_size. */
38 #pragma __pointer_size short
44 extern void decc$
main ();
49 handler (sigargs
, mechargs
)
57 __main (arg1
, arg2
, arg3
, image_file_desc
, arg5
, arg6
)
58 void *arg1
, *arg2
, *arg3
;
59 void *image_file_desc
;
66 #pragma __pointer_size long
72 #pragma __pointer_size short
74 lib$
establish (handler
);
75 decc$
main (arg1
, arg2
, arg3
, image_file_desc
,
76 arg5
, arg6
, &argc
, &argv
, &envp
);
78 #pragma __pointer_size long
80 /* Reallocate argv with 64 bit pointers. */
81 long_argv
= (char **) malloc (sizeof (char *) * (argc
+ 1));
83 for (i
= 0; i
< argc
; i
++)
84 long_argv
[i
] = strdup (argv
[i
]);
86 long_argv
[argc
] = (char *) 0;
88 long_envp
= (char **) malloc (sizeof (char *) * 5);
90 for (i
= 0; envp
[i
]; i
++)
91 long_envp
[i
] = strdup (envp
[i
]);
93 long_envp
[i
] = (char *) 0;
95 #pragma __pointer_size short
97 return main (argc
, long_argv
, long_envp
);