*** cplus-decl.c.orig Wed Oct 11 10:37:53 1989 --- cplus-decl.c Wed Oct 11 14:21:21 1989 *************** *** 7327,7333 **** --- 7327,7337 ---- && ! strcmp (IDENTIFIER_POINTER (DECL_NAME (fndecl)), "main")) { /* Make it so that `main' always returns 0 by default. */ + #ifdef VMS + c_expand_return (integer_one_node); + #else c_expand_return (integer_zero_node); + #endif } /* That's the end of the vtable decl's life. Need to mark it such *** cplus-except.c.orig Mon Oct 2 05:53:52 1989 --- cplus-except.c Wed Oct 11 14:21:22 1989 *************** *** 38,43 **** --- 38,47 ---- #define _JBLEN 11 #endif + #ifdef VMS + #define _JBLEN 15 + #endif + tree exception_label_decl; /* The exception `type' currently in scope, or NULL_TREE if none. */ *** cplus-lex.c.orig Wed Oct 11 10:44:44 1989 --- cplus-lex.c Wed Oct 11 14:21:23 1989 *************** *** 28,33 **** --- 28,36 ---- #include "config.h" #include "input.h" #include "tree.h" + #ifdef VMS + #define _IOFBF 2 /* Missing from GNU's stdio.h */ + #endif #include "cplus-tab.h" #include "cplus-parse.h" #include "cplus-tree.h" *************** *** 37,42 **** --- 40,51 ---- extern int errno; /* needed for VAX. */ extern jmp_buf toplevel; + #ifdef VMS + #define NULL_FILE "nla0:" + #else + #define NULL_FILE "/dev/null" + #endif + #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free *************** *** 752,758 **** reinit_lex_for_unexec () { finput1 = finput; ! finput2 = fopen ("/dev/null", "r"); } void --- 761,767 ---- reinit_lex_for_unexec () { finput1 = finput; ! finput2 = fopen (NULL_FILE, "r"); } void *************** *** 782,788 **** and will increment it to 1. */ lineno = 0; finput1 = finput; ! finput2 = fopen ("/dev/null", "r"); current_function_decl = NULL; maxtoken = 40; --- 791,797 ---- and will increment it to 1. */ lineno = 0; finput1 = finput; ! finput2 = fopen (NULL_FILE, "r"); current_function_decl = NULL; maxtoken = 40; *************** *** 990,997 **** --- 999,1011 ---- setvbuf(finput2,t->buf,_IOFBF,t->len); finput2->_cnt = t->len-1; #else + #ifdef VMS + setvbuf(finput2,t->buf,_IOFBF,t->len); + (*finput2)->_cnt = t->len-1; + #else setbuffer (finput2, t->buf, t->len); finput2->_cnt = finput2->_bufsiz - 1; + #endif #endif /* USG */ #else setvbuf(finput2,t->buf,_IOFBF,t->len); *************** *** 1607,1615 **** --- 1621,1633 ---- && getc(finput) == 'p' && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n')) { + #ifdef VMS + ; /* Are you crazy? */ + #else ungetc(c, finput); dump_data(); longjmp (toplevel, 1); + #endif } else if (c == 'v' && getc(finput) == 't' *************** *** 2085,2092 **** --- 2103,2115 ---- setvbuf(finput2,t->buf,_IOFBF,t->len); finput2->_cnt = t->len-1; #else + #ifdef VMS + setvbuf(finput2,t->buf,_IOFBF,t->len); + (*finput2)->_cnt = t->len-1; + #else setbuffer (finput2, t->buf, t->len); finput2->_cnt = finput2->_bufsiz - 1; + #endif #endif /* USG */ #else setvbuf(finput2,t->buf,_IOFBF,t->len); *************** *** 2245,2250 **** --- 2268,2274 ---- { tmp = get_identifier (token_buffer); + #ifndef VMS /* Make sure that user does not collide with our internal naming scheme. */ if (dollar_seen *************** *** 2260,2265 **** --- 2284,2290 ---- || ANON_PARMNAME_P (tmp))) warning ("identifier name `%s' conflicts with GNU C++ internal naming strategy", token_buffer); + #endif /* Come into here if we must reprocess an identifier. */ resume_identifier_processing: *** toplev.c.orig Sun Sep 17 14:28:39 1989 --- toplev.c Wed Oct 11 14:21:24 1989 *************** *** 1116,1126 **** --- 1116,1131 ---- prev_file = fopen (previous_asm_file_name, "r"); if (prev_file == 0) pfatal_with_name (previous_asm_file_name); + #ifdef VMS + if (1) + #else if (asm_out_file->_bufsiz != prev_file->_bufsiz) + #endif { while ((c = getc (prev_file)) != EOF) putc (c, asm_out_file); } + #ifndef VMS else { /* Copy quickly. */ *************** *** 1138,1143 **** --- 1143,1149 ---- } while (size == asm_out_file->_bufsiz); } + #endif fclose (prev_file); }