mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
* lib/bitset.c (bitset_print): Don't assume size_t can be printed with %d format. * lib/ebitset.c (min, max): Undef before defining. * lib/vbitset.c (min, max): Likewise. * lib/subpipe.c (create_subpipe): Save local variables in case vfork clobbers them. * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the error message syntax used by gcc-4.0.
This commit is contained in:
15
ChangeLog
15
ChangeLog
@@ -1,3 +1,18 @@
|
|||||||
|
2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
|
||||||
|
* lib/bitset.c (bitset_print): Don't assume size_t can be printed
|
||||||
|
with %d format.
|
||||||
|
* lib/ebitset.c (min, max): Undef before defining.
|
||||||
|
* lib/vbitset.c (min, max): Likewise.
|
||||||
|
* lib/subpipe.c (create_subpipe): Save local variables in case
|
||||||
|
vfork clobbers them.
|
||||||
|
|
||||||
|
2005-05-24 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
* tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
|
||||||
|
error message syntax used by gcc-4.0.
|
||||||
|
|
||||||
2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
|
2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
* README: Mention m4 1.4.3. Remove obsolete advice about
|
* README: Mention m4 1.4.3. Remove obsolete advice about
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* General bitsets.
|
/* General bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -307,7 +307,7 @@ bitset_print (FILE *file, bitset bset, bool verbose)
|
|||||||
pos = 0;
|
pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (file, "%d ", i);
|
fprintf (file, "%lu ", (unsigned long int) i);
|
||||||
pos += 1 + (i >= 10) + (i >= 100);
|
pos += 1 + (i >= 10) + (i >= 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support expandable bitsets.
|
/* Functions to support expandable bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -115,11 +115,11 @@ static ebitset_elt *ebitset_free_list; /* Free list of bitset elements. */
|
|||||||
((BSET)->b.cindex = (EINDEX) * EBITSET_ELT_WORDS, \
|
((BSET)->b.cindex = (EINDEX) * EBITSET_ELT_WORDS, \
|
||||||
(BSET)->b.cdata = EBITSET_WORDS (EBITSET_ELTS (BSET) [EINDEX]))
|
(BSET)->b.cdata = EBITSET_WORDS (EBITSET_ELTS (BSET) [EINDEX]))
|
||||||
|
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
#define min(a, b) ((a) > (b) ? (b) : (a))
|
#define min(a, b) ((a) > (b) ? (b) : (a))
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
|
||||||
static bitset_bindex
|
static bitset_bindex
|
||||||
ebitset_resize (bitset src, bitset_bindex n_bits)
|
ebitset_resize (bitset src, bitset_bindex n_bits)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -114,6 +114,13 @@ create_subpipe (char const * const *argv, int fd[2])
|
|||||||
|| (from_out_fd = fd_safer (pipe_fd[1])) < 0)
|
|| (from_out_fd = fd_safer (pipe_fd[1])) < 0)
|
||||||
error (EXIT_FAILURE, errno, "pipe");
|
error (EXIT_FAILURE, errno, "pipe");
|
||||||
|
|
||||||
|
/* Save the local variables in the parent now, in case vfork
|
||||||
|
clobbers them. */
|
||||||
|
fd[0] = to_out_fd;
|
||||||
|
fd[1] = from_in_fd;
|
||||||
|
pipe_fd[0] = to_in_fd;
|
||||||
|
pipe_fd[1] = from_out_fd;
|
||||||
|
|
||||||
pid = vfork ();
|
pid = vfork ();
|
||||||
if (pid < 0)
|
if (pid < 0)
|
||||||
error (EXIT_FAILURE, errno, "fork");
|
error (EXIT_FAILURE, errno, "fork");
|
||||||
@@ -137,10 +144,8 @@ create_subpipe (char const * const *argv, int fd[2])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Parent. */
|
/* Parent. */
|
||||||
close (to_in_fd);
|
close (pipe_fd[0]);
|
||||||
close (from_out_fd);
|
close (pipe_fd[1]);
|
||||||
fd[0] = to_out_fd;
|
|
||||||
fd[1] = from_in_fd;
|
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Variable array bitsets.
|
/* Variable array bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -48,7 +48,8 @@ static bitset_bindex vbitset_list_reverse (bitset, bitset_bindex *,
|
|||||||
#define VBITSET_SIZE(X) ((X)->b.csize)
|
#define VBITSET_SIZE(X) ((X)->b.csize)
|
||||||
#define VBITSET_ASIZE(X) ((X)->v.size)
|
#define VBITSET_ASIZE(X) ((X)->v.size)
|
||||||
|
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
#define min(a, b) ((a) > (b) ? (b) : (a))
|
#define min(a, b) ((a) > (b) ? (b) : (a))
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Executing Actions. -*- Autotest -*-
|
# Executing Actions. -*- Autotest -*-
|
||||||
# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,11 +29,13 @@ m4_define([AT_SYNCLINES_COMPILE],
|
|||||||
[AT_CHECK([$CC $CFLAGS $CPPFLAGS -c $1], [ignore], [], [stderr])
|
[AT_CHECK([$CC $CFLAGS $CPPFLAGS -c $1], [ignore], [], [stderr])
|
||||||
# In case GCC displays column information, strip it down.
|
# In case GCC displays column information, strip it down.
|
||||||
#
|
#
|
||||||
# input.y:4:2: #error "4" or input.y:4.2: #error "4"
|
# input.y:4:2: #error "4" or
|
||||||
|
# input.y:4.2: #error "4" or
|
||||||
|
# input.y:4:2: error: #error "4"
|
||||||
# =>
|
# =>
|
||||||
# input.y:4: #error "4"
|
# input.y:4: #error "4"
|
||||||
#
|
#
|
||||||
AT_CHECK([[sed 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/' stderr]], 0, [stdout])
|
AT_CHECK([[sed -e 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/' -e 's/^\([^:]*:[^:]*:\)[^@%:@]*\( @%:@error\)/\1\2/' stderr]], 0, [stdout])
|
||||||
])
|
])
|
||||||
|
|
||||||
# AT_TEST_SYNCLINE(TITLE, INPUT, ERROR-MSG)
|
# AT_TEST_SYNCLINE(TITLE, INPUT, ERROR-MSG)
|
||||||
|
|||||||
Reference in New Issue
Block a user