From: Bruno Haible Date: Wed, 1 May 2019 19:30:00 +0000 (+0200) Subject: msginit: Improvements for Cygwin and Android. X-Git-Tag: v0.20~11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=113517ae9b240da752e1fc9d85dbe8c4bb4f4865;p=thirdparty%2Fgettext.git msginit: Improvements for Cygwin and Android. * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add sh-filename. * gettext-tools/src/msginit.c (project_id, project_id_version, get_user_email, language_team_address): Use BOURNE_SHELL instead of hardcoding /bin/sh. --- diff --git a/autogen.sh b/autogen.sh index 1e0ed8978..a0f4ece2c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -176,6 +176,7 @@ if ! $skip_gnulib; then relocatable-prog relocatable-script setlocale + sh-filename sh-quote sigpipe sigprocmask diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 889bd4662..1d90717fe 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -881,11 +881,11 @@ project_id (const char *header) prog = xconcatenated_filename (gettextlibdir, "project-id", NULL); /* Call the project-id shell script. */ - argv[0] = "/bin/sh"; + argv[0] = BOURNE_SHELL; argv[1] = prog; argv[2] = NULL; - child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false, - fd); + child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true, + false, fd); if (child == -1) goto failed; @@ -955,12 +955,12 @@ project_id_version (const char *header) prog = xconcatenated_filename (gettextlibdir, "project-id", NULL); /* Call the project-id shell script. */ - argv[0] = "/bin/sh"; + argv[0] = BOURNE_SHELL; argv[1] = prog; argv[2] = "yes"; argv[3] = NULL; - child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false, - fd); + child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true, + false, fd); if (child == -1) goto failed; @@ -1114,15 +1114,15 @@ get_user_email () int exitstatus; /* Ask the user for his email address. */ - argv[0] = "/bin/sh"; + argv[0] = BOURNE_SHELL; argv[1] = (char *) prog; argv[2] = (char *) _("\ The new message catalog should contain your email address, so that users can\n\ give you feedback about the translations, and so that maintainers can contact\n\ you in case of unexpected technical problems.\n"); argv[3] = NULL; - child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false, - fd); + child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true, + false, fd); if (child == -1) goto failed; @@ -1213,15 +1213,15 @@ language_team_address () int exitstatus; /* Call the team-address shell script. */ - argv[0] = "/bin/sh"; + argv[0] = BOURNE_SHELL; argv[1] = (char *) prog; argv[2] = (char *) relocate (PROJECTSDIR); argv[3] = (char *) relocate (LIBDIR "/gettext"); argv[4] = (char *) catalogname; argv[5] = (char *) language; argv[6] = NULL; - child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false, - fd); + child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true, + false, fd); if (child == -1) goto failed;