diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1994-11-21 07:33:22 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1994-11-21 07:33:22 +0000 |
| commit | 01233029edba45b14c75afe36248d0df998b3cc3 (patch) | |
| tree | e3246a9664c2bcea9329b550600f6612589b3cd0 /gnu/usr.bin | |
| parent | c264e2c65c3f4fe911fa70df828625a6b19c6d84 (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin')
35 files changed, 201 insertions, 141 deletions
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile index 344b60c20908..608c9b129c98 100644 --- a/gnu/usr.bin/cc/Makefile +++ b/gnu/usr.bin/cc/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 1.2 1994/09/18 22:35:35 wollman Exp $ +# $Id$ # PGMDIR= cc_int cpp cc1 cc cc1plus c++ f77 libgcc diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index caadf00e9794..fb959378d91a 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -1,5 +1,5 @@ # -# $Id: Makefile.inc,v 1.8 1994/11/03 20:37:05 phk Exp $ +# $Id$ # CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../include @@ -7,7 +7,7 @@ CFLAGS+= -Dbsd4_4 CFLAGS+= -DGCC_INCLUDE_DIR=\"FOO\" CFLAGS+= -DTOOL_INCLUDE_DIR=\"FOO\" CFLAGS+= -DGPLUSPLUS_INCLUDE_DIR=\"FOO\" -CFLAGS+= -DDEFAULT_TARGET_VERSION=\"2.6.1\" +CFLAGS+= -DDEFAULT_TARGET_VERSION=\"2.6.2\" CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"i386--freebsd\" CFLAGS+= -DMD_EXEC_PREFIX=\"/usr/libexec/\" CFLAGS+= -DSTANDARD_STARTFILE_PREFIX=\"/usr/lib\" @@ -22,7 +22,7 @@ LIBDESTDIR= ${.CURDIR}/../cc_int # XXX LDDESTDIR isn't a directory and there is no standard name for the dir LDDESTDIR= -L${LIBDESTDIR} .if defined(SHARED_LIBCC_INT) -LIBCC_INT= ${LIBDESTDIR}/libcc_int.so.261.0 +LIBCC_INT= ${LIBDESTDIR}/libcc_int.so.262.0 .else LIBCC_INT= ${LIBDESTDIR}/libcc_int.a .endif diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile index 8eee9cde71ec..5557c627dfdc 100644 --- a/gnu/usr.bin/cc/c++/Makefile +++ b/gnu/usr.bin/cc/c++/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 1.3 1994/09/18 22:35:43 wollman Exp $ +# $Id$ # PROG = c++ diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile index 9c50ab954ab0..8da044cd90fc 100644 --- a/gnu/usr.bin/cc/cc/Makefile +++ b/gnu/usr.bin/cc/cc/Makefile @@ -1,12 +1,12 @@ # -# $Id: Makefile,v 1.5 1994/09/18 22:35:46 wollman Exp $ +# $Id$ # -.PATH: ${.CURDIR}/../cc_int PROG = cc -SRCS = gcc.c obstack.c version.c +SRCS = gcc.c BINDIR= /usr/bin - -LINKS= ${BINDIR}/cc ${BINDIR}/gcc +.PATH: ${.CURDIR}/../cc_int +SRCS+= obstack.c version.c +LINKS= ${BINDIR}/cc ${BINDIR}/gcc .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cc/gcc.c b/gnu/usr.bin/cc/cc/gcc.c index 595f594ded6e..cafd0e4f1049 100644 --- a/gnu/usr.bin/cc/cc/gcc.c +++ b/gnu/usr.bin/cc/cc/gcc.c @@ -2438,7 +2438,7 @@ process_command (argc, argv) } temp = getenv ("LIBRARY_PATH"); - if (temp) + if (temp && ! cross_compile) { char *startp, *endp; char *nstore = (char *) alloca (strlen (temp) + 3); @@ -2470,7 +2470,7 @@ process_command (argc, argv) /* Use LPATH like LIBRARY_PATH (for the CMU build program). */ temp = getenv ("LPATH"); - if (temp) + if (temp && ! cross_compile) { char *startp, *endp; char *nstore = (char *) alloca (strlen (temp) + 3); diff --git a/gnu/usr.bin/cc/cc1/c-decl.c b/gnu/usr.bin/cc/cc1/c-decl.c index 995009a46354..427ff3a7d37a 100644 --- a/gnu/usr.bin/cc/cc1/c-decl.c +++ b/gnu/usr.bin/cc/cc1/c-decl.c @@ -1698,11 +1698,16 @@ duplicate_decls (newdecl, olddecl) make_var_volatile (newdecl); } - /* Keep source location of definition rather than declaration. */ - if (DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0) + /* Keep source location of definition rather than declaration. + Likewise, keep decl at outer scope. */ + if ((DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0) + || (DECL_CONTEXT (newdecl) != 0 && DECL_CONTEXT (olddecl) == 0)) { DECL_SOURCE_LINE (newdecl) = DECL_SOURCE_LINE (olddecl); DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl); + + if (DECL_CONTEXT (olddecl) == 0) + DECL_CONTEXT (newdecl) = 0; } /* Merge the unused-warning information. */ diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile index 82508500771b..29c66153578a 100644 --- a/gnu/usr.bin/cc/cc_int/Makefile +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 1.5 1994/10/25 07:02:23 davidg Exp $ +# $Id$ # SRCS = aux-output.c bc-emit.c bc-optab.c c-common.c caller-save.c calls.c combine.c convert.c cse.c dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.c final.c flow.c fold-const.c function.c getpwd.c global.c insn-attrtab.c insn-emit.c insn-extract.c insn-opinit.c insn-output.c insn-peep.c insn-recog.c integrate.c jump.c local-alloc.c loop.c obstack.c optabs.c print-rtl.c print-tree.c real.c recog.c reg-stack.c regclass.c reload.c reload1.c reorg.c rtl.c rtlanal.c sched.c sdbout.c stmt.c stor-layout.c stupid.c toplev.c tree.c unroll.c varasm.c version.c xcoffout.c @@ -7,7 +7,7 @@ LIB = cc_int NOPROFILE= yes .if defined(SHARED_LIBCC_INT) INTERNALLIB= -SHLIB_MAJOR=261 +SHLIB_MAJOR=262 SHLIB_MINOR=0 .else diff --git a/gnu/usr.bin/cc/cc_int/aux-output.c b/gnu/usr.bin/cc/cc_int/aux-output.c index de569b6cf138..17dd9db740ec 100644 --- a/gnu/usr.bin/cc/cc_int/aux-output.c +++ b/gnu/usr.bin/cc/cc_int/aux-output.c @@ -2819,7 +2819,7 @@ save_386_machine_status (p) struct function *p; { p->machine = (struct machine_function *) xmalloc (sizeof i386_stack_locals); - bcopy (i386_stack_locals, p->machine->i386_stack_locals, + bcopy ((char *) i386_stack_locals, (char *) p->machine->i386_stack_locals, sizeof i386_stack_locals); } @@ -2827,7 +2827,7 @@ void restore_386_machine_status (p) struct function *p; { - bcopy (p->machine->i386_stack_locals, i386_stack_locals, + bcopy ((char *) p->machine->i386_stack_locals, (char *) i386_stack_locals, sizeof i386_stack_locals); free (p->machine); } diff --git a/gnu/usr.bin/cc/cc_int/bc-emit.c b/gnu/usr.bin/cc/cc_int/bc-emit.c index 55e4fe4f39bb..c8d50bb7ebc2 100644 --- a/gnu/usr.bin/cc/cc_int/bc-emit.c +++ b/gnu/usr.bin/cc/cc_int/bc-emit.c @@ -867,7 +867,7 @@ bc_emit_bytecode (bytecode) char byte; static int prev_lineno = -1; - byte = bytecode; + byte = (char) bytecode; #ifdef BCDEBUG_PRINT_CODE if (lineno != prev_lineno) diff --git a/gnu/usr.bin/cc/cc_int/c-common.c b/gnu/usr.bin/cc/cc_int/c-common.c index efc5fcbcdf7a..6735b5aa8c11 100644 --- a/gnu/usr.bin/cc/cc_int/c-common.c +++ b/gnu/usr.bin/cc/cc_int/c-common.c @@ -215,7 +215,8 @@ decl_attributes (decl, attributes) for (a = attributes; a; a = TREE_CHAIN (a)) if (!(name = TREE_VALUE (a))) continue; - else if (name == get_identifier ("packed")) + else if (name == get_identifier ("packed") + || name == get_identifier ("__packed__")) { if (TREE_CODE (decl) == FIELD_DECL) DECL_PACKED (decl) = 1; @@ -226,7 +227,9 @@ decl_attributes (decl, attributes) } else if (TREE_VALUE (a) == get_identifier ("noreturn") - || TREE_VALUE (a) == get_identifier ("volatile")) + || TREE_VALUE (a) == get_identifier ("__noreturn__") + || TREE_VALUE (a) == get_identifier ("volatile") + || TREE_VALUE (a) == get_identifier ("__volatile__")) { if (TREE_CODE (decl) == FUNCTION_DECL) TREE_THIS_VOLATILE (decl) = 1; @@ -240,7 +243,8 @@ decl_attributes (decl, attributes) warning_with_decl (decl, "`%s' attribute ignored", IDENTIFIER_POINTER (TREE_VALUE (a))); } - else if (TREE_VALUE (a) == get_identifier ("const")) + else if (TREE_VALUE (a) == get_identifier ("const") + || TREE_VALUE (a) == get_identifier ("__const__")) { if (TREE_CODE (decl) == FUNCTION_DECL) TREE_READONLY (decl) = 1; @@ -253,7 +257,8 @@ decl_attributes (decl, attributes) else warning_with_decl (decl, "`const' attribute ignored"); } - else if (TREE_VALUE (a) == get_identifier ("transparent_union")) + else if (TREE_VALUE (a) == get_identifier ("transparent_union") + || TREE_VALUE (a) == get_identifier ("__transparent_union__")) { if (TREE_CODE (decl) == PARM_DECL && TREE_CODE (type) == UNION_TYPE @@ -286,7 +291,8 @@ found_attr:; IDENTIFIER_POINTER (name)); } else if ( args = TREE_CHAIN(name), - !strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode") + (!strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode") + || !strcmp (IDENTIFIER_POINTER (name), "__mode__")) && list_length (args) == 1 && TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE) { @@ -313,7 +319,8 @@ found_attr:; if (i == NUM_MACHINE_MODES) error_with_decl (decl, "unknown machine mode `%s'", specified_name); } - else if (!strcmp (IDENTIFIER_POINTER (name), "section") + else if ((!strcmp (IDENTIFIER_POINTER (name), "section") + || !strcmp (IDENTIFIER_POINTER (name), "__section__")) && list_length (args) == 1 && TREE_CODE (TREE_VALUE (args)) == STRING_CST) { @@ -340,7 +347,8 @@ found_attr:; error_with_decl (decl, "section attributes are not supported for this target"); #endif } - else if (!strcmp (IDENTIFIER_POINTER (name), "aligned") + else if ((!strcmp (IDENTIFIER_POINTER (name), "aligned") + || !strcmp (IDENTIFIER_POINTER (name), "__aligned__")) && list_length (args) == 1 && TREE_CODE (TREE_VALUE (args)) == INTEGER_CST) { @@ -372,7 +380,8 @@ found_attr:; else DECL_ALIGN (decl) = align; } - else if (!strcmp (IDENTIFIER_POINTER (name), "format") + else if ((!strcmp (IDENTIFIER_POINTER (name), "format") + || !strcmp (IDENTIFIER_POINTER (name), "__format__")) && list_length (args) == 3 && TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE && TREE_CODE (TREE_VALUE (TREE_CHAIN (args))) == INTEGER_CST @@ -394,9 +403,11 @@ found_attr:; continue; } - if (!strcmp (IDENTIFIER_POINTER (format_type), "printf")) + if (!strcmp (IDENTIFIER_POINTER (format_type), "printf") + || !strcmp (IDENTIFIER_POINTER (format_type), "__printf__")) is_scan = 0; - else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf")) + else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf") + || !strcmp (IDENTIFIER_POINTER (format_type), "__scanf__")) is_scan = 1; else { @@ -508,7 +519,7 @@ typedef struct { /* Type of argument if length modifier `l' is used. If NULL, then this modifier is not allowed. */ tree *llen; - /* Type of argument if length modifier `q' is used. + /* Type of argument if length modifier `q' or `ll' is used. If NULL, then this modifier is not allowed. */ tree *qlen; /* Type of argument if length modifier `L' is used. @@ -519,8 +530,8 @@ typedef struct { } format_char_info; static format_char_info print_char_table[] = { - { "di", 0, T_I, T_I, T_L, T_LL, NULL, "-wp0 +" }, - { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0#" }, + { "di", 0, T_I, T_I, T_L, T_LL, T_LL, "-wp0 +" }, + { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0#" }, { "u", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0" }, /* Two GNU extensions. */ { "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" }, @@ -536,8 +547,8 @@ static format_char_info print_char_table[] = { }; static format_char_info scan_char_table[] = { - { "di", 1, T_I, T_S, T_L, T_LL, NULL, "*" }, - { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, NULL, "*" }, + { "di", 1, T_I, T_S, T_L, T_LL, T_LL, "*" }, + { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, "*" }, { "efgEG", 1, T_F, NULL, T_D, NULL, T_LD, "*" }, { "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" }, { "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" }, @@ -895,6 +906,8 @@ check_format_info (info, params) length_char = *format_chars++; else length_char = 0; + if (length_char == 'l' && *format_chars == 'l') + length_char = 'q', format_chars++; aflag = 0; if (*format_chars == 'a') { diff --git a/gnu/usr.bin/cc/cc_int/calls.c b/gnu/usr.bin/cc/cc_int/calls.c index 2002322afa49..2d58770f67ad 100644 --- a/gnu/usr.bin/cc/cc_int/calls.c +++ b/gnu/usr.bin/cc/cc_int/calls.c @@ -3065,7 +3065,10 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl, but PCC has one, so this will avoid some problems. */ emit_queue (); - /* Free any temporary slots made in processing this argument. */ + /* Free any temporary slots made in processing this argument. Show + that we might have taken the address of something and pushed that + as an operand. */ + preserve_temp_slots (NULL_RTX); free_temp_slots (); pop_temp_slots (); diff --git a/gnu/usr.bin/cc/cc_int/combine.c b/gnu/usr.bin/cc/cc_int/combine.c index 4399bb0863e7..8ab15473e43b 100644 --- a/gnu/usr.bin/cc/cc_int/combine.c +++ b/gnu/usr.bin/cc/cc_int/combine.c @@ -1835,8 +1835,13 @@ try_combine (i3, i2, i1) if (split_code == MULT && GET_CODE (XEXP (*split, 1)) == CONST_INT && (i = exact_log2 (INTVAL (XEXP (*split, 1)))) >= 0) - SUBST (*split, gen_rtx_combine (ASHIFT, split_mode, - XEXP (*split, 0), GEN_INT (i))); + { + SUBST (*split, gen_rtx_combine (ASHIFT, split_mode, + XEXP (*split, 0), GEN_INT (i))); + /* Update split_code because we may not have a multiply + anymore. */ + split_code = GET_CODE (*split); + } #ifdef INSN_SCHEDULING /* If *SPLIT is a paradoxical SUBREG, when we split it, it should diff --git a/gnu/usr.bin/cc/cc_int/expmed.c b/gnu/usr.bin/cc/cc_int/expmed.c index b5c19aac71f0..596112323eb8 100644 --- a/gnu/usr.bin/cc/cc_int/expmed.c +++ b/gnu/usr.bin/cc/cc_int/expmed.c @@ -2740,7 +2740,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) case TRUNC_DIV_EXPR: if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size) { - if (unsignedp) + if (unsignedp + || (INTVAL (op1) + == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (compute_mode) - 1))) { unsigned HOST_WIDE_INT mh, ml; int pre_shift, post_shift; @@ -2901,6 +2903,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) tquotient, 0); } + /* We have computed OP0 / abs(OP1). If OP1 is negative, negate + the quotient. */ if (d < 0) { insn = get_last_insn (); diff --git a/gnu/usr.bin/cc/cc_int/function.c b/gnu/usr.bin/cc/cc_int/function.c index 821d61ac7101..844af836f635 100644 --- a/gnu/usr.bin/cc/cc_int/function.c +++ b/gnu/usr.bin/cc/cc_int/function.c @@ -839,6 +839,7 @@ assign_stack_temp (mode, size, keep) plus_constant (XEXP (best_p->slot, 0), rounded_size)); p->address = 0; + p->rtl_expr = 0; p->next = temp_slots; temp_slots = p; @@ -1098,14 +1099,14 @@ preserve_rtl_expr_result (x) if (x == 0 || GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0))) return; - /* If we can find a match, move it to our level. */ - for (p = temp_slots; p; p = p->next) - if (p->in_use && rtx_equal_p (x, p->slot)) - { - p->level = temp_slot_level; - p->rtl_expr = 0; - return; - } + /* If we can find a match, move it to our level unless it is already at + an upper level. */ + p = find_temp_slot_from_address (XEXP (x, 0)); + if (p != 0) + { + p->level = MIN (p->level, temp_slot_level); + p->rtl_expr = 0; + } return; } diff --git a/gnu/usr.bin/cc/cc_int/real.c b/gnu/usr.bin/cc/cc_int/real.c index cad4343c7cfd..f3e22a7cad43 100644 --- a/gnu/usr.bin/cc/cc_int/real.c +++ b/gnu/usr.bin/cc/cc_int/real.c @@ -246,15 +246,15 @@ unknown arithmetic type #define NE 6 #define MAXDECEXP 4932 #define MINDECEXP -4956 -#define GET_REAL(r,e) bcopy (r, e, 2*NE) -#define PUT_REAL(e,r) bcopy (e, r, 2*NE) +#define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE) +#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE) #else /* no XFmode */ #if LONG_DOUBLE_TYPE_SIZE == 128 #define NE 10 #define MAXDECEXP 4932 #define MINDECEXP -4977 -#define GET_REAL(r,e) bcopy (r, e, 2*NE) -#define PUT_REAL(e,r) bcopy (e, r, 2*NE) +#define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE) +#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE) #else #define NE 6 #define MAXDECEXP 4932 diff --git a/gnu/usr.bin/cc/cc_int/reg-stack.c b/gnu/usr.bin/cc/cc_int/reg-stack.c index f52b2887296e..df45dd4980af 100644 --- a/gnu/usr.bin/cc/cc_int/reg-stack.c +++ b/gnu/usr.bin/cc/cc_int/reg-stack.c @@ -225,9 +225,8 @@ static rtx FP_mode_reg[FIRST_PSEUDO_REGISTER][(int) MAX_MACHINE_MODE]; definition are validity of this information. */ #define BLOCK_NUM(INSN) \ - (((INSN_UID (INSN) > max_uid) \ - ? (int *)(abort() , 0) \ - : block_number)[INSN_UID (INSN)]) + ((INSN_UID (INSN) > max_uid) \ + ? (abort() , -1) : block_number[INSN_UID (INSN)]) extern rtx forced_labels; extern rtx gen_jump (); @@ -368,8 +367,8 @@ reg_to_stack (first, file) block_stack_in = (stack) alloca (blocks * sizeof (struct stack_def)); block_out_reg_set = (HARD_REG_SET *) alloca (blocks * sizeof (HARD_REG_SET)); - bzero (block_stack_in, blocks * sizeof (struct stack_def)); - bzero (block_out_reg_set, blocks * sizeof (HARD_REG_SET)); + bzero ((char *) block_stack_in, blocks * sizeof (struct stack_def)); + bzero ((char *) block_out_reg_set, blocks * sizeof (HARD_REG_SET)); block_number = (int *) alloca ((max_uid + 1) * sizeof (int)); @@ -819,7 +818,7 @@ record_asm_reg_life (insn, regstack, operands, constraints, Also enforce rule #5: Output operands must start at the top of the reg-stack: output operands may not "skip" a reg. */ - bzero (reg_used_as_output, sizeof (reg_used_as_output)); + bzero ((char *) reg_used_as_output, sizeof (reg_used_as_output)); for (i = 0; i < n_outputs; i++) if (STACK_REG_P (operands[i])) if (reg_class_size[(int) operand_class[i]] != 1) @@ -852,7 +851,7 @@ record_asm_reg_life (insn, regstack, operands, constraints, to the top of the reg-stack than any input that is not implicitly popped. */ - bzero (implicitly_dies, sizeof (implicitly_dies)); + bzero ((char *) implicitly_dies, sizeof (implicitly_dies)); for (i = first_input; i < first_input + n_inputs; i++) if (STACK_REG_P (operands[i])) { @@ -1216,7 +1215,7 @@ find_blocks (first) label_value_list); } - BLOCK_NUM (insn) = block; + block_number[INSN_UID (insn)] = block; if (code != NOTE) prev_code = code; @@ -2342,7 +2341,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints, } } - bcopy (regstack, &temp_stack, sizeof (temp_stack)); + bcopy ((char *) regstack, (char *) &temp_stack, sizeof (temp_stack)); /* Put the input regs into the desired place in TEMP_STACK. */ diff --git a/gnu/usr.bin/cc/cc_int/reload1.c b/gnu/usr.bin/cc/cc_int/reload1.c index d6dadf27345f..49a1811ea201 100644 --- a/gnu/usr.bin/cc/cc_int/reload1.c +++ b/gnu/usr.bin/cc/cc_int/reload1.c @@ -1329,10 +1329,10 @@ reload (first, global, dumpfile) need only in the smallest class in which it is required. */ - bcopy (insn_needs.other.regs[0], basic_needs, - sizeof basic_needs); - bcopy (insn_needs.other.groups, basic_groups, - sizeof basic_groups); + bcopy ((char *) insn_needs.other.regs[0], + (char *) basic_needs, sizeof basic_needs); + bcopy ((char *) insn_needs.other.groups, + (char *) basic_groups, sizeof basic_groups); for (i = 0; i < N_REG_CLASSES; i++) { diff --git a/gnu/usr.bin/cc/cc_int/version.c b/gnu/usr.bin/cc/cc_int/version.c index 1c3fd1bf9d30..5928315efc14 100644 --- a/gnu/usr.bin/cc/cc_int/version.c +++ b/gnu/usr.bin/cc/cc_int/version.c @@ -1 +1 @@ -char *version_string = "2.6.1"; +char *version_string = "2.6.2"; diff --git a/gnu/usr.bin/cc/cpp/Makefile b/gnu/usr.bin/cc/cpp/Makefile index 0bbc198d9d31..43ec78c3a49f 100644 --- a/gnu/usr.bin/cc/cpp/Makefile +++ b/gnu/usr.bin/cc/cpp/Makefile @@ -2,9 +2,10 @@ # $Id$ # -.PATH: ${.CURDIR}/../cc_int PROG = cpp -SRCS = cccp.c cexp.c obstack.c version.c +SRCS = cccp.c cexp.c BINDIR= /usr/libexec +.PATH: ${.CURDIR}/../cc_int +SRCS+= obstack.c version.c .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cpp/cccp.c b/gnu/usr.bin/cc/cpp/cccp.c index d5144669ddae..609249ba63b7 100644 --- a/gnu/usr.bin/cc/cpp/cccp.c +++ b/gnu/usr.bin/cc/cpp/cccp.c @@ -604,14 +604,14 @@ static struct default_include { automatically in Makefile.in. */ { CROSS_INCLUDE_DIR, 0, 0 }, /* This is another place that the target system's headers might be. */ - { TOOL_INCLUDE_DIR, 0, 1 }, + { TOOL_INCLUDE_DIR, 0, 0 }, #else /* not CROSS_COMPILE */ /* This should be /usr/local/include and should come before the fixincludes-fixed header files. */ { LOCAL_INCLUDE_DIR, 0, 1 }, /* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here. Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */ - { TOOL_INCLUDE_DIR, 0, 1 }, + { TOOL_INCLUDE_DIR, 0, 0 }, /* This is the dir for fixincludes. Put it just before the files that we fix. */ { GCC_INCLUDE_DIR, 0, 0 }, @@ -3275,10 +3275,10 @@ startagain: /* This is now known to be a macro call. Discard the macro name from the output, along with any following whitespace just copied, - but preserve newlines at the top level since this + but preserve newlines if not outputting marks since this is more likely to do the right thing with line numbers. */ obp = op->buf + obufp_before_macroname; - if (ip->macro != 0) + if (output_marks) op->lineno = op_lineno_before_macroname; else { int newlines = op->lineno - op_lineno_before_macroname; @@ -9031,16 +9031,18 @@ dump_single_macro (hp, of) concat = 0; for (ap = defn->pattern; ap != NULL; ap = ap->next) { dump_defn_1 (defn->expansion, offset, ap->nchars, of); - if (ap->nchars != 0) - concat = 0; offset += ap->nchars; - if (ap->stringify) - fprintf (of, " #"); - if (ap->raw_before && !concat) - fprintf (of, " ## "); - concat = 0; + if (!traditional) { + if (ap->nchars != 0) + concat = 0; + if (ap->stringify) + fprintf (of, " #"); + if (ap->raw_before && !concat) + fprintf (of, " ## "); + concat = 0; + } dump_arg_n (defn, ap->argno, of); - if (ap->raw_after) { + if (!traditional && ap->raw_after) { fprintf (of, " ## "); concat = 1; } @@ -9069,7 +9071,7 @@ dump_all_macros () /* Output to OF a substring of a macro definition. BASE is the beginning of the definition. Output characters START thru LENGTH. - Discard newlines outside of strings, thus + Unless traditional, discard newlines outside of strings, thus converting funny-space markers to ordinary spaces. */ static void @@ -9082,16 +9084,20 @@ dump_defn_1 (base, start, length, of) U_CHAR *p = base + start; U_CHAR *limit = base + start + length; - while (p < limit) { - if (*p == '\"' || *p =='\'') { - U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR, - NULL_PTR, NULL_PTR); - fwrite (p, p1 - p, 1, of); - p = p1; - } else { - if (*p != '\n') - putc (*p, of); - p++; + if (traditional) + fwrite (p, sizeof (*p), length, of); + else { + while (p < limit) { + if (*p == '\"' || *p =='\'') { + U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR, + NULL_PTR, NULL_PTR); + fwrite (p, sizeof (*p), p1 - p, of); + p = p1; + } else { + if (*p != '\n') + putc (*p, of); + p++; + } } } } diff --git a/gnu/usr.bin/cc/include/bc-arity.h b/gnu/usr.bin/cc/include/bc-arity.h index d311745367f6..c75c040ffe4d 100644 --- a/gnu/usr.bin/cc/include/bc-arity.h +++ b/gnu/usr.bin/cc/include/bc-arity.h @@ -2,16 +2,16 @@ { 1, 0, 0, {0}}, { 1, 2, 0, {0}}, { 1, 2, 0, {0}}, -{ 0, 0, 1, {SIcode, }}, -{ 0, 0, 1, {SIcode, }}, -{ 0, 1, 1, {QIcode, }}, -{ 0, 1, 1, {HIcode, }}, -{ 0, 1, 1, {SIcode, }}, -{ 0, 1, 1, {DIcode, }}, -{ 0, 1, 1, {SFcode, }}, -{ 0, 1, 1, {DFcode, }}, -{ 0, 1, 1, {XFcode, }}, -{ 0, 1, 1, {Pcode, }}, +{ 0, 0, 1, {(char) SIcode, }}, +{ 0, 0, 1, {(char) SIcode, }}, +{ 0, 1, 1, {(char) QIcode, }}, +{ 0, 1, 1, {(char) HIcode, }}, +{ 0, 1, 1, {(char) SIcode, }}, +{ 0, 1, 1, {(char) DIcode, }}, +{ 0, 1, 1, {(char) SFcode, }}, +{ 0, 1, 1, {(char) DFcode, }}, +{ 0, 1, 1, {(char) XFcode, }}, +{ 0, 1, 1, {(char) Pcode, }}, { 1, 1, 0, {0}}, { 1, 1, 0, {0}}, { 1, 1, 0, {0}}, @@ -30,10 +30,10 @@ { 2, 0, 0, {0}}, { 3, 0, 0, {0}}, { 2, 0, 0, {0}}, -{ 1, 1, 1, {SIcode, }}, +{ 1, 1, 1, {(char) SIcode, }}, { 1, 1, 0, {0}}, -{ 0, 1, 1, {SIcode, }}, -{ 0, 1, 1, {SIcode, }}, +{ 0, 1, 1, {(char) SIcode, }}, +{ 0, 1, 1, {(char) SIcode, }}, { 1, 1, 0, {0}}, { 1, 1, 0, {0}}, { 1, 1, 0, {0}}, @@ -218,15 +218,15 @@ { 2, 1, 0, {0}}, { 2, 1, 0, {0}}, { 4, 1, 0, {0}}, -{ 1, 0, 1, {SIcode, }}, -{ 1, 0, 1, {SIcode, }}, -{ 0, 0, 1, {SIcode, }}, +{ 1, 0, 1, {(char) SIcode, }}, +{ 1, 0, 1, {(char) SIcode, }}, +{ 0, 0, 1, {(char) SIcode, }}, { 0, 0, 0, {0}}, -{ 1, 0, 3, {SIcode, SIcode, SIcode, }}, -{ 1, 0, 3, {SIcode, SIcode, SIcode, }}, -{ 1, 0, 3, {SIcode, SIcode, SIcode, }}, -{ 1, 0, 3, {SIcode, SIcode, SIcode, }}, +{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }}, +{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }}, +{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }}, +{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }}, { 3, 0, 0, {0}}, { 0, 1, 0, {0}}, { 0, 0, 0, {0}}, -{ 0, 0, 1, {SIcode, }}, +{ 0, 0, 1, {(char) SIcode, }}, diff --git a/gnu/usr.bin/cc/include/i386/bsd.h b/gnu/usr.bin/cc/include/i386/bsd.h index 8aec30430301..abc9f0ea5855 100644 --- a/gnu/usr.bin/cc/include/i386/bsd.h +++ b/gnu/usr.bin/cc/include/i386/bsd.h @@ -22,6 +22,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Include common aspects of all 386 Unix assemblers. */ #include "i386/unix.h" +/* Don't assume anything about the header files. */ +#define NO_IMPLICIT_EXTERN_C + /* Use the Sequent Symmetry assembler syntax. */ #define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)"); diff --git a/gnu/usr.bin/cc/include/obstack.h b/gnu/usr.bin/cc/include/obstack.h index a5db1a0e749a..28bcd44dba80 100644 --- a/gnu/usr.bin/cc/include/obstack.h +++ b/gnu/usr.bin/cc/include/obstack.h @@ -268,8 +268,11 @@ int obstack_chunk_size (struct obstack *obstack); #define obstack_blank_fast(h,n) ((h)->next_free += (n)) -#if defined (__GNUC__) && defined (__STDC__) -#if __GNUC__ < 2 +#if defined (__GNUC__) && defined (__STDC__) && __STDC__ +/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ +#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) #define __extension__ #endif diff --git a/gnu/usr.bin/cc/libgcc/Makefile b/gnu/usr.bin/cc/libgcc/Makefile index e40c4b47dd1d..78e28095758f 100644 --- a/gnu/usr.bin/cc/libgcc/Makefile +++ b/gnu/usr.bin/cc/libgcc/Makefile @@ -1,5 +1,5 @@ # -# $FreeBSD$ +# $Id$ # LIB= gcc diff --git a/gnu/usr.bin/dialog/TESTS/checklist b/gnu/usr.bin/dialog/TESTS/checklist index 1d84516d8c9e..008e874c9507 100755 --- a/gnu/usr.bin/dialog/TESTS/checklist +++ b/gnu/usr.bin/dialog/TESTS/checklist @@ -6,10 +6,10 @@ $DIALOG --title "CHECKLIST BOX" --clear \ present a list of choices which can be turned on or \n\ off. If there are more items than can fit on the \n\ screen, the list will be scrolled. You can use the \n\ -UP/DOWN arrow keys, the first letter of the choice as a \n\ +UP/DOWN arrow keys, the first letter of the choice as a\n\ hot key, or the number keys 1-9 to choose an option. \n\ Press SPACE to toggle an option on/off. \n\n\ - Which of the following are fruits?" 20 61 5 \ + Which of the following are fruits?" -1 -1 5 \ "Apple" "It's an apple." off \ "Dog" "No, that's not my dog." ON \ "Orange" "Yeah, that's juicy." off \ diff --git a/gnu/usr.bin/dialog/TESTS/infobox b/gnu/usr.bin/dialog/TESTS/infobox index 764dc0811a56..89d4736f1459 100755 --- a/gnu/usr.bin/dialog/TESTS/infobox +++ b/gnu/usr.bin/dialog/TESTS/infobox @@ -8,7 +8,7 @@ not pause waiting for input after displaying the message. The pause here is only introduced by the sleep command, not by dialog. -You have 10 seconds to read this..." 10 52 +You have 10 seconds to read this..." -1 -1 stty -echo sleep 10 diff --git a/gnu/usr.bin/dialog/TESTS/inputbox b/gnu/usr.bin/dialog/TESTS/inputbox index 6e1e33a3c01b..2acb846efe22 100755 --- a/gnu/usr.bin/dialog/TESTS/inputbox +++ b/gnu/usr.bin/dialog/TESTS/inputbox @@ -8,9 +8,9 @@ to input a string as the answer. You can \n\ input strings of length longer than the \n\ width of the input box, in that case, the \n\ input field will be automatically scrolled. \n\ -You can use BACKSPACE, LEFT, RIGHT, HOME, END \n\ +You can use BACKSPACE, LEFT, RIGHT, HOME, END\n\ to correct errors. \n\n\ -Try inputing your name below:" 16 51 "John Smith" 2> /tmp/inputbox.tmp.$$ +Try inputing your name below:" -1 -1 "John Smith" 2> /tmp/inputbox.tmp.$$ retval=$? diff --git a/gnu/usr.bin/dialog/TESTS/menubox b/gnu/usr.bin/dialog/TESTS/menubox index d7a2276eaead..0309dd5f22cd 100755 --- a/gnu/usr.bin/dialog/TESTS/menubox +++ b/gnu/usr.bin/dialog/TESTS/menubox @@ -10,7 +10,7 @@ You can use the UP/DOWN arrow keys, the first \n\ letter of the choice as a hot key, or the \n\ number keys 1-9 to choose an option.\n\ Try it now!\n\n\ - Choose the OS you like:" 20 59 4 \ + Choose the OS you like:" -1 -1 4 \ "FreeBSD 2.0" "A Real Operating System for Real Users" \ "Linux" "Another free Unix Clone for 386/486" \ "OS/2" "IBM OS/2" \ diff --git a/gnu/usr.bin/dialog/TESTS/msgbox b/gnu/usr.bin/dialog/TESTS/msgbox index 58dae1581af1..7f1b1f8089e3 100755 --- a/gnu/usr.bin/dialog/TESTS/msgbox +++ b/gnu/usr.bin/dialog/TESTS/msgbox @@ -2,9 +2,9 @@ DIALOG=${DIALOG=/usr/bin/dialog} $DIALOG --title "MESSAGE BOX" --clear \ - --msgbox "Hi, this is a simple message box. You can use this to \ - display any message you like. The box will remain until \ - you press the ENTER key." 10 41 + --msgbox "Hi, this is a simple message box. You can use this to\n\ +display any message you like. The box will remain until\n\ +you press the ENTER key." -1 -1 case $? in 0) diff --git a/gnu/usr.bin/dialog/TESTS/radiolist b/gnu/usr.bin/dialog/TESTS/radiolist index 16f3a2325a95..74027902e66f 100755 --- a/gnu/usr.bin/dialog/TESTS/radiolist +++ b/gnu/usr.bin/dialog/TESTS/radiolist @@ -6,10 +6,10 @@ $DIALOG --title "RADIOLIST BOX" --clear \ present a list of choices, one of them can be turned \n\ on or off. If there are more items than can fit on the \n\ screen, the list will be scrolled. You can use the \n\ -UP/DOWN arrow keys, the first letter of the choice as a \n\ +UP/DOWN arrow keys, the first letter of the choice as a\n\ hot key, or the number keys 1-9 to choose an option. \n\ Press SPACE to toggle an option on/off. \n\n\ - Which of the following are fruits?" 20 61 5 \ + Which of the following are fruits?" -1 -1 5 \ "Apple" "It's an apple." off \ "Dog" "No, that's not my dog." ON \ "Orange" "Yeah, that's juicy." off \ diff --git a/gnu/usr.bin/gdb/gdb/terminal.h b/gnu/usr.bin/gdb/gdb/terminal.h index f76fa9031336..de52a16ba499 100644 --- a/gnu/usr.bin/gdb/gdb/terminal.h +++ b/gnu/usr.bin/gdb/gdb/terminal.h @@ -20,6 +20,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if !defined (TERMINAL_H) #define TERMINAL_H 1 +#include <sys/types.h> + #if !defined(__GO32__) && !defined (HAVE_TERMIOS) /* Define a common set of macros -- BSD based -- and redefine whatever diff --git a/gnu/usr.bin/man/catman/Makefile b/gnu/usr.bin/man/catman/Makefile index f4bd03f7baec..a66ae9e3fd0e 100644 --- a/gnu/usr.bin/man/catman/Makefile +++ b/gnu/usr.bin/man/catman/Makefile @@ -1,15 +1,26 @@ +FILES= catman NOMAN= noman -CLEANFILES= catman -beforeinstall: catman - install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - catman ${DESTDIR}${BINDIR} +CLEANFILES+= ${FILES} -.include <bsd.prog.mk> +all: ${FILES} +# XXX null suffixes are currently broken +# .SUFFIXES: +# .SUFFIXES: .sh +# .sh: +# sed -e 's,%compress%,${compress},' \ +# -e 's,%compext%,${compext},' \ +# -e 's,%zcat%,${zcat},' \ +# ${.IMPSRC} > ${.TARGET} catman: catman.sh sed -e 's,%compress%,${compress},' \ - -e 's,%compext%,${compext},' \ - -e 's,%zcat%,${zcat},' \ - ${.CURDIR}/catman.sh > catman + -e 's,%compext%,${compext},' \ + -e 's,%zcat%,${zcat},' \ + ${.CURDIR}/${.TARGET}.sh > ${.TARGET} +install: + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${FILES} ${DESTDIR}${BINDIR} + +.include <bsd.prog.mk> diff --git a/gnu/usr.bin/man/makewhatis/Makefile b/gnu/usr.bin/man/makewhatis/Makefile index bd14975c490a..984999508710 100644 --- a/gnu/usr.bin/man/makewhatis/Makefile +++ b/gnu/usr.bin/man/makewhatis/Makefile @@ -1,17 +1,20 @@ # @(#)Makefile 5.6 (Berkeley) 6/23/90 +FILES= makewhatis NOMAN= noman -CLEANFILES= makewhatis -beforeinstall: makewhatis - install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - makewhatis ${DESTDIR}${BINDIR} +CLEANFILES+= ${FILES} -.include <bsd.prog.mk> +all: ${FILES} makewhatis: makewhatis.sh sed -e 's/%sections%/ "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "p", "o", NULL/' \ - -e 's,%zcat%,${zcat},' \ - -e 's,%compext%,${compext},' \ - ${.CURDIR}/makewhatis.sh > makewhatis + -e 's,%compext%,${compext},' \ + -e 's,%zcat%,${zcat},' \ + ${.CURDIR}/${.TARGET}.sh > ${.TARGET} +install: + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${FILES} ${DESTDIR}${BINDIR} + +.include <bsd.prog.mk> diff --git a/gnu/usr.bin/perl/lib/timelocal.pl b/gnu/usr.bin/perl/lib/timelocal.pl index b7367fae9dbd..7028c8e01a24 100644 --- a/gnu/usr.bin/perl/lib/timelocal.pl +++ b/gnu/usr.bin/perl/lib/timelocal.pl @@ -37,6 +37,7 @@ CONFIG: { $HR = 60 * $MIN; $DAYS = 24 * $HR; $YearFix = ((gmtime(946684800))[5] == 100) ? 100 : 0; + 1; } sub timegm { diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh index 6729a8e90fe1..7aaa5011fbe3 100644 --- a/gnu/usr.bin/send-pr/send-pr.sh +++ b/gnu/usr.bin/send-pr/send-pr.sh @@ -31,7 +31,7 @@ SUBMITTER=unknown GNATS_ROOT= # The default mail address for PR submissions. -GNATS_ADDR=FreeBSD-gnats-submit@freefall.cdrom.com +GNATS_ADDR=FreeBSD-gnats-submit@freebsd.org # Where the gnats category tree lives. DATADIR=@DATADIR@ |
