* Makefile (repertoiremaps): Remove variable.
	(distribute): Remove repertoiremaps.
	(install-others): Likewise. Add .gz to charmaps.
	($(inst_i18ndir)/charmaps/%): Install in gzipped format.

2000-09-30  Bruno Haible  <haible@clisp.cons.org>
This commit is contained in:
Ulrich Drepper 2000-10-01 19:08:30 +00:00
parent 4a9dcff10e
commit d77cd295eb
6 changed files with 32 additions and 22 deletions

View File

@ -1,3 +1,10 @@
2000-09-30 Bruno Haible <haible@clisp.cons.org>
* Makefile (repertoiremaps): Remove variable.
(distribute): Remove repertoiremaps.
(install-others): Likewise. Add .gz to charmaps.
($(inst_i18ndir)/charmaps/%): Install in gzipped format.
2000-09-30 Bruno Haible <haible@clisp.cons.org> 2000-09-30 Bruno Haible <haible@clisp.cons.org>
* charmaps/ISO-IR-197: Remove alias "none". * charmaps/ISO-IR-197: Remove alias "none".

View File

@ -31,10 +31,6 @@ charmaps := $(filter-out $(addprefix charmaps/, CVS RCS SCCS %~), \
locales := $(filter-out $(addprefix locales/, CVS RCS SCCS %~), \ locales := $(filter-out $(addprefix locales/, CVS RCS SCCS %~), \
$(wildcard locales/*)) $(wildcard locales/*))
# List of repertoire maps.
repertoiremaps := $(filter-out $(addprefix repertoiremaps/, CVS RCS SCCS %~), \
$(wildcard repertoiremaps/*))
subdir-dirs = tests-mbwc subdir-dirs = tests-mbwc
vpath %.c tests-mbwc vpath %.c tests-mbwc
@ -64,7 +60,7 @@ generated-dirs := $(ld-test-names) tt_TT de_DE.437 \
$(addprefix tstfmon_,$(fmon-tests)) \ $(addprefix tstfmon_,$(fmon-tests)) \
distribute := CHECKSUMS README SUPPORTED ChangeLog \ distribute := CHECKSUMS README SUPPORTED ChangeLog \
$(charmaps) $(locales) $(repertoiremaps) \ $(charmaps) $(locales) \
tst-rpmatch.sh tst-locale.sh tst-fmon.sh sort-test.sh \ tst-rpmatch.sh tst-locale.sh tst-fmon.sh sort-test.sh \
tst-fmon.data $(test-input-data) $(ld-test-srcs) \ tst-fmon.data $(test-input-data) $(ld-test-srcs) \
th_TH.in cs_CZ.in tst-mbswcs.sh tst-trans.sh tst-ctype.sh \ th_TH.in cs_CZ.in tst-mbswcs.sh tst-trans.sh tst-ctype.sh \
@ -98,15 +94,21 @@ tests = $(locale_test_suite) tst-digits
endif endif
# Files to install. # Files to install.
install-others := $(addprefix $(inst_i18ndir)/, $(charmaps) $(locales) \ install-others := $(addprefix $(inst_i18ndir)/, \
$(repertoiremaps)) $(addsuffix .gz, $(charmaps)) \
$(locales))
include ../Rules include ../Rules
# Install the source files in the appropriate directories. # Install the charmap files in gzipped format.
$(inst_i18ndir)/charmaps/%: charmaps/% $(+force); $(do-install) $(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
$(make-target-directory)
rm -f $(@:.gz=) $@
$(INSTALL_DATA) $< $(@:.gz=)
gzip -9 $(@:.gz=)
# Install the locale source files in the appropriate directory.
$(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install) $(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)
$(inst_i18ndir)/repertoiremaps/%: repertoiremaps/% $(+force); $(do-install)
# gcc does not know all the format specifiers we are using here. # gcc does not know all the format specifiers we are using here.
CFLAGS-tst-mbswcs1.c = -Wno-format CFLAGS-tst-mbswcs1.c = -Wno-format

View File

@ -35,10 +35,10 @@ posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *file_actions,
if (fd < 0 || fd >= maxfd) if (fd < 0 || fd >= maxfd)
return EBADF; return EBADF;
/* Allocate more memory of needed. */ /* Allocate more memory if needed. */
if (file_actions->__used == file_actions->__allocated if (file_actions->__used == file_actions->__allocated
&& __posix_spawn_file_actions_realloc (file_actions) != 0) && __posix_spawn_file_actions_realloc (file_actions) != 0)
/* THis can only mean we ran out of memory. */ /* This can only mean we ran out of memory. */
return ENOMEM; return ENOMEM;
/* Add the new value. */ /* Add the new value. */

View File

@ -35,10 +35,10 @@ posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *file_actions,
if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd) if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
return EBADF; return EBADF;
/* Allocate more memory of needed. */ /* Allocate more memory if needed. */
if (file_actions->__used == file_actions->__allocated if (file_actions->__used == file_actions->__allocated
&& __posix_spawn_file_actions_realloc (file_actions) != 0) && __posix_spawn_file_actions_realloc (file_actions) != 0)
/* THis can only mean we ran out of memory. */ /* This can only mean we ran out of memory. */
return ENOMEM; return ENOMEM;
/* Add the new value. */ /* Add the new value. */

View File

@ -36,10 +36,10 @@ posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions,
if (fd < 0 || fd >= maxfd) if (fd < 0 || fd >= maxfd)
return EBADF; return EBADF;
/* Allocate more memory of needed. */ /* Allocate more memory if needed. */
if (file_actions->__used == file_actions->__allocated if (file_actions->__used == file_actions->__allocated
&& __posix_spawn_file_actions_realloc (file_actions) != 0) && __posix_spawn_file_actions_realloc (file_actions) != 0)
/* THis can only mean we ran out of memory. */ /* This can only mean we ran out of memory. */
return ENOMEM; return ENOMEM;
/* Add the new value. */ /* Add the new value. */

View File

@ -21,23 +21,24 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "spawn_int.h"
/* Function used to increase the size of the allocated array. This /* Function used to increase the size of the allocated array. This
function is called from the `add'-functions. */ function is called from the `add'-functions. */
int int
__posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions) __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions)
{ {
int newalloc = file_actions->__allocated + 8;
void *newmem = realloc (file_actions->__actions, void *newmem = realloc (file_actions->__actions,
file_actions->__allocated += 8); newalloc * sizeof (struct __spawn_action));
if (newmem == NULL) if (newmem == NULL)
{ /* Not enough memory. */
/* Not enough memory. */ return ENOMEM;
file_actions->__allocated -= 8;
return ENOMEM;
}
file_actions->__actions = (struct __spawn_action *) newmem; file_actions->__actions = (struct __spawn_action *) newmem;
file_actions->__allocated = newalloc;
return 0; return 0;
} }