From 0566022b14ef4a56848e66095b6ccfbdd7db69b9 Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Sun, 26 Apr 2009 09:43:27 -0400 Subject: Fix CD gapless playback. Similar to the fix in cset 86b9162cfcfe. --- src/demuxers/demux_cdda.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c index 8e9ad3679..d48bb2a51 100644 --- a/src/demuxers/demux_cdda.c +++ b/src/demuxers/demux_cdda.c @@ -60,6 +60,7 @@ typedef struct { input_plugin_t *input; int status; + int send_newpts; int seek_flag; /* this is set when a seek just occurred */ } demux_cdda_t; @@ -91,9 +92,9 @@ static int demux_cdda_send_chunk (demux_plugin_t *this_gen) { buf->extra_info->input_time = buf->pts / 90; buf->decoder_flags |= BUF_FLAG_FRAME_END; - if (this->seek_flag) { - _x_demux_control_newpts(this->stream, buf->pts, BUF_FLAG_SEEK); - this->seek_flag = 0; + if (this->send_newpts) { + _x_demux_control_newpts(this->stream, buf->pts, this->seek_flag); + this->send_newpts = this->seek_flag = 0; } this->audio_fifo->put (this->audio_fifo, buf); @@ -146,9 +147,14 @@ static int demux_cdda_seek (demux_plugin_t *this_gen, off_t start_pos, int start this->input->seek(this->input, start_pos & ~3, SEEK_SET); else this->input->seek(this->input, start_time * CD_BYTES_PER_SECOND, SEEK_SET); - this->seek_flag = 1; + this->status = DEMUX_OK; - _x_demux_flush_engine (this->stream); + + this->send_newpts = 1; + if (playing) { + this->seek_flag = BUF_FLAG_SEEK; + _x_demux_flush_engine (this->stream); + } return this->status; } -- cgit v1.2.3 From f536c40dc4581e74972f855c56405255447a4841 Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Sun, 26 Apr 2009 09:43:27 -0400 Subject: Adjust the CDDA frame cache to a 'snappier' value. --- src/input/input_cdda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index d982909eb..68ebbb612 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -113,7 +113,7 @@ typedef struct _cdrom_toc { *************************************************************************/ #define MAX_TRACKS 99 -#define CACHED_FRAMES 500 +#define CACHED_FRAMES 100 typedef struct { int start; -- cgit v1.2.3 From c22d3db08866e2cf77e4aca29d01bde2fcb6e95b Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 10 May 2009 21:36:54 +0100 Subject: Remove default /usr/lib when locating libXvMC & libXvMCW. Was breaking on systems which, for some strange reason, use /usr/lib64. --- configure.ac | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index b765782ce..e6c025dea 100644 --- a/configure.ac +++ b/configure.ac @@ -744,7 +744,7 @@ if test "x$no_x" = "x" && test "x$enable_xvmc" != "xno"; then AC_ARG_WITH(xxmc-path, AS_HELP_STRING([--with-xxmc-path=path], [where libXvMC libraries for the xxmc plugin are installed. Defalts to the default X library path.]), - xxmc_path="$withval", xxmc_path="${x_libraries:-/usr/lib}") + xxmc_path="$withval", xxmc_path="$x_libraries") AC_ARG_WITH(xxmc-lib, AS_HELP_STRING([--with-xxmc-lib=XXXX], [The name of the XvMC library libXXXX.so for the xxmc plugin.]),xxmc_stub="$withval", xxmc_stub="XvMCW") @@ -755,7 +755,7 @@ if test "x$x_includes" != "x"; then CPPFLAGS="$CPPFLAGS -I$x_includes" fi -XXMC_LIBS="-L$xxmc_path -l$xxmc_stub" +XXMC_LIBS="${xxmc_path:+-L}$xxmc_path -l$xxmc_stub" AC_MSG_CHECKING(whether to enable the xxmc plugin with vld extensions) AC_MSG_RESULT() dnl Check if vld "extended" XvMC is available @@ -764,7 +764,7 @@ if test "x$xxmc_stub" == "xXvMCW" && test "x$ac_have_xv" == "xyes"; then ac_have_xxmc="yes", [ac_have_xxmc="no" AC_MSG_RESULT([*** Could not link with -l$xxmc_stub for vld extensions.])], - [-L$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) + [${xxmc_path:+-L}$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) else if test "x$ac_have_xv" = "xyes"; then AC_CHECK_LIB($xxmc_stub, XvMCPutSlice, @@ -772,7 +772,7 @@ else XXMC_LIBS="$XXMC_LIBS -lXvMC"], [ac_have_xxmc="no" AC_MSG_RESULT([*** Could not link with -l$xxmc_stub -lXvMC for vld extensions.])], - [-L$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) + [${xxmc_path:+-L}$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) else ac_have_xxmc="no", fi @@ -794,7 +794,7 @@ if test "x$ac_have_xxmc" = "xno"; then ac_have_xxmc="yes", [ac_have_xxmc="no" AC_MSG_RESULT([*** Could not link with -l$xxmc_stub for standard XvMC.])], - [-L$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) + [${xxmc_path:+-L}$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) else if test "x$ac_have_xv" = "xyes"; then AC_CHECK_LIB($xxmc_stub, XvMCCreateContext, @@ -802,7 +802,7 @@ if test "x$ac_have_xxmc" = "xno"; then XXMC_LIBS="$XXMC_LIBS -lXvMC"], [ac_have_xxmc="no" AC_MSG_RESULT([*** Could not link with -lXvMC for standard XvMC.])], - [-L$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) + [${xxmc_path:+-L}$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) else ac_have_xxmc="no", fi @@ -835,12 +835,12 @@ if test "x$no_x" = "x" && test "x$enable_xvmc" != "xno"; then AC_ARG_WITH(xvmc-path, AS_HELP_STRING([--with-xvmc-path=path], [where libXvMC libraries for the xvmc plugin are installed. Defalts to the default X library path.]), - xvmc_path="$withval", xvmc_path="${x_libraries:-/usr/lib}") + xvmc_path="$withval", xvmc_path="$x_libraries") AC_ARG_WITH(xvmc-lib, AS_HELP_STRING([--with-xvmc-lib=XXXX], [The name of the XvMC library libXXXX.so for the xvmc plugin.]),xvmc_stub="$withval", xvmc_stub="XvMCW") saved_libs="$LIBS" -XVMC_LIBS="-L$xvmc_path -l$xvmc_stub" +XVMC_LIBS="${xvmc_path:+-L}$xvmc_path -l$xvmc_stub" AC_MSG_CHECKING(whether to enable the xvmc plugin) AC_MSG_RESULT() if test "x$xvmc_stub" == "xXvMCW"; then @@ -848,7 +848,7 @@ if test "x$xvmc_stub" == "xXvMCW"; then ac_have_xvmc="yes", [ac_have_xvmc="no" AC_MSG_RESULT([*** Could not link with -l$xvmc_stub.])], - [-L$xvmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) + [${xvmc_path:+-L}$xvmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) else if test "x$ac_have_xv" = "xyes"; then AC_CHECK_LIB($xvmc_stub, XvMCCreateContext, @@ -856,7 +856,7 @@ else XVMC_LIBS="$XVMC_LIBS -lXvMC"], [ac_have_xvmc="no" AC_MSG_RESULT([*** Could not link with -lXvMC.])], - [-L$xvmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) + [${xvmc_path:+-L}$xvmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS]) else ac_have_xvmc="no", fi -- cgit v1.2.3 From 62f8c9b05e77a753b6dbdbea754f755eb050ed5f Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 10 May 2009 21:24:05 +0100 Subject: CDDB parsing code duplication cleanup. --HG-- extra : transplant_source : w%85%203%2C%D1%04%CCgoRexh%03%88%9E%86Z%5B --- src/input/input_cdda.c | 213 ++++++++++++++++--------------------------------- 1 file changed, 70 insertions(+), 143 deletions(-) diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 68ebbb612..9a9429359 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -1433,6 +1433,68 @@ static int _cdda_cddb_handle_code(char *buf) { return err; } +static inline char *_cdda_append (/*const*/ char *first, const char *second) +{ + if (!first) + return strdup (second); + + char *result = (char *) realloc (first, strlen (first) + strlen (second) + 1); + strcat (result, second); + return result; +} + +static void _cdda_parse_cddb_info (cdda_input_plugin_t *this, char *buffer, char **dtitle) +{ + /* buffer should be no more than 2048 bytes... */ + char buf[2048]; + int track_no; + + if (sscanf (buffer, "DTITLE=%s", &buf[0]) == 1) { + char *pt = strchr (buffer, '='); + if (pt) { + ++pt; + + *dtitle = _cdda_append (*dtitle, pt); + pt = strdup (*dtitle); + + char *title = strstr (pt, " / "); + if (title) + { + *title = 0; + title += 3; + free (this->cddb.disc_artist); + this->cddb.disc_artist = strdup (pt); + } + else + title = pt; + + free (this->cddb.disc_title); + this->cddb.disc_title = strdup (title); + + free (pt); + } + } + else if (sscanf (buffer, "DYEAR=%s", &buf[0]) == 1) { + char *pt = strrchr (buffer, '='); + if (pt && strlen (pt) == 5) + this->cddb.disc_year = strdup (pt + 1); + } + else if (sscanf (buffer, "TTITLE%d=%s", &track_no, &buf[0]) == 2) { + char *pt = strchr(buffer, '='); + this->cddb.track[track_no].title = _cdda_append (this->cddb.track[track_no].title, pt + 1); + } + else if (!strncmp (buffer, "EXTD=", 5)) + { + if (!this->cddb.disc_year) + { + int nyear; + char *y = strstr (buffer, "YEAR:"); + if (y && sscanf (y + 5, "%4d", &nyear) == 1) + asprintf (&this->cddb.disc_year, "%d", nyear); + } + } +} + /* * Try to load cached cddb infos */ @@ -1465,82 +1527,16 @@ static int _cdda_load_cached_cddb_infos(cdda_input_plugin_t *this) { return 0; } else { - char buffer[256], *ln; - char buf[256]; - int tnum; + char buffer[2048], *ln; char *dtitle = NULL; - while ((ln = fgets(buffer, 255, fd)) != NULL) { - - buffer[strlen(buffer) - 1] = '\0'; - - if (sscanf(buffer, "DTITLE=%s", &buf[0]) == 1) { - char *pt, *artist, *title; - - pt = strchr(buffer, '='); - if (pt) { - pt++; - - if (dtitle != NULL) - { - dtitle = (char *) realloc(dtitle, strlen(dtitle) + strlen(pt) + 1); - strcat(dtitle, pt); - pt = dtitle; - } - dtitle = strdup(pt); - - artist = pt; - title = strstr(pt, " / "); - if (title) { - *title++ = '\0'; - title += 2; - } - else { - title = artist; - artist = NULL; - } - - if (artist) - this->cddb.disc_artist = strdup(artist); - - this->cddb.disc_title = strdup(title); - } - } - else if (sscanf(buffer, "DYEAR=%s", &buf[0]) == 1) { - char *pt; + while ((ln = fgets(buffer, sizeof (buffer) - 1, fd)) != NULL) { - pt = strrchr(buffer, '='); - pt++; - if (pt != NULL && strlen(pt) == 4) - this->cddb.disc_year = strdup(pt); - } - else if (sscanf(buffer, "TTITLE%d=%s", &tnum, &buf[0]) == 2) { - char *pt; - - pt = strchr(buffer, '='); - if (pt) - pt++; - if (this->cddb.track[tnum].title == NULL) - this->cddb.track[tnum].title = strdup(pt); - else - { - this->cddb.track[tnum].title - = (char *) realloc(this->cddb.track[tnum].title, strlen(this->cddb.track[tnum].title) + strlen(pt) + 1); - strcat(this->cddb.track[tnum].title, pt); - } - } - else { - if (!strncmp(buffer, "EXTD=", 5)) { - char *y; - int nyear; - - y = strstr(buffer, "YEAR:"); - if (y && this->cddb.disc_year == NULL) { - if (sscanf(y+5, "%4d", &nyear) == 1) - asprintf(&this->cddb.disc_year, "%d", nyear); - } - } - } + int length = strlen (buffer); + if (length && buffer[length - 1] == '\n') + buffer[length - 1] = '\0'; + + _cdda_parse_cddb_info (this, buffer, &dtitle); } fclose(fd); free(dtitle); @@ -1803,82 +1799,13 @@ static int _cdda_cddb_retrieve(cdda_input_plugin_t *this) { memset(&buffercache, 0, sizeof(buffercache)); while (strcmp(buffer, ".")) { - char buf[2048]; - int tnum; size_t bufsize = strlen(buffercache); memset(&buffer, 0, sizeof(buffer)); _cdda_cddb_socket_read(this, buffer, sizeof(buffer) - 1); snprintf(buffercache + bufsize, sizeof(buffercache) - bufsize, "%s\n", buffer); - if (sscanf(buffer, "DTITLE=%s", &buf[0]) == 1) { - char *pt, *artist, *title; - - pt = strrchr(buffer, '='); - if (pt) { - pt++; - - if (dtitle != NULL) - { - dtitle = (char *) realloc(dtitle, strlen(dtitle) + strlen(pt) + 1); - strcat(dtitle, pt); - pt = dtitle; - } - dtitle = strdup(pt); - - artist = pt; - title = strstr(pt, " / "); - if (title) { - *title++ = '\0'; - title += 2; - } - else { - title = artist; - artist = NULL; - } - - if (artist) { - this->cddb.disc_artist = strdup(artist); - } - this->cddb.disc_title = strdup(title); - } - } - else if(sscanf(buffer, "DYEAR=%s", &buf[0]) == 1) { - char *pt; - - pt = strrchr(buffer, '='); - pt++; - if (pt != NULL && strlen(pt) == 4) - this->cddb.disc_year = strdup(pt); - } - else if (sscanf(buffer, "TTITLE%d=%s", &tnum, &buf[0]) == 2) { - char *pt; - - pt = strrchr(buffer, '='); - if (pt) { - pt++; - if (this->cddb.track[tnum].title == NULL) - this->cddb.track[tnum].title = strdup(pt); - else - { - this->cddb.track[tnum].title - = (char *) realloc(this->cddb.track[tnum].title, strlen(this->cddb.track[tnum].title) + strlen(pt) + 1); - strcat(this->cddb.track[tnum].title, pt); - } - } - } - else { - if (!strncmp(buffer, "EXTD=", 5)) { - char *y; - int nyear; - - y = strstr(buffer, "YEAR:"); - if (y && this->cddb.disc_year == NULL) { - if (sscanf(y+5, "%4d", &nyear) == 1) - asprintf(&this->cddb.disc_year, "%d", nyear); - } - } - } + _cdda_parse_cddb_info (this, buffer, &dtitle); } free(dtitle); -- cgit v1.2.3 From cc36b63853e116978e76b0e54ad0480d77ff0981 Mon Sep 17 00:00:00 2001 From: Markus Kaufhold Date: Sun, 10 May 2009 21:29:05 +0100 Subject: Provide genre & track no. for CDDB data (Tweaked to fit current hg and to fix a bug.) --HG-- extra : transplant_source : %FC%0C%D1n%D1%26%90%88%E0%EC%7D/%27%A1i%00%B0m%E5%AF --- src/input/input_cdda.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 9a9429359..baae34321 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -1479,6 +1479,11 @@ static void _cdda_parse_cddb_info (cdda_input_plugin_t *this, char *buffer, char if (pt && strlen (pt) == 5) this->cddb.disc_year = strdup (pt + 1); } + else if(sscanf(buffer, "DGENRE=%s", &buf[0]) == 1) { + char *pt = strrchr(buffer, '='); + if (pt) + this->cddb.disc_category = strdup (pt + 1); + } else if (sscanf (buffer, "TTITLE%d=%s", &track_no, &buf[0]) == 2) { char *pt = strchr(buffer, '='); this->cddb.track[track_no].title = _cdda_append (this->cddb.track[track_no].title, pt + 1); @@ -2418,6 +2423,9 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { } lprintf("Track %d Title: %s\n", this->track+1, pt); + char tracknum[4]; + snprintf(tracknum, 4, "%d", this->track+1); + _x_meta_info_set_utf8(this->stream, XINE_META_INFO_TRACK_NUMBER, tracknum); _x_meta_info_set_utf8(this->stream, XINE_META_INFO_TITLE, pt); } -- cgit v1.2.3 From 817e40dd565b54786ae7034f6a38ce641e31dd64 Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Sun, 10 May 2009 21:30:56 +0100 Subject: Further improve parsing of CDDB information Use strchr instead of strrchr to allow text to contain "=". --HG-- extra : transplant_source : l%29%15%0F%DFVV%08%B7%CF%FEb%E0v%22%18%FA%9Ap%8B --- src/input/input_cdda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index baae34321..c1cfb3d67 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -1475,12 +1475,12 @@ static void _cdda_parse_cddb_info (cdda_input_plugin_t *this, char *buffer, char } } else if (sscanf (buffer, "DYEAR=%s", &buf[0]) == 1) { - char *pt = strrchr (buffer, '='); + char *pt = strchr (buffer, '='); if (pt && strlen (pt) == 5) this->cddb.disc_year = strdup (pt + 1); } else if(sscanf(buffer, "DGENRE=%s", &buf[0]) == 1) { - char *pt = strrchr(buffer, '='); + char *pt = strchr(buffer, '='); if (pt) this->cddb.disc_category = strdup (pt + 1); } -- cgit v1.2.3 From 7449244be479be3437f822a99c12d8597176e1af Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 17 May 2009 14:28:25 +0100 Subject: Require gettext 0.17; pull in some related updates (via autopoint). --- configure.ac | 2 +- m4/intdiv0.m4 | 46 ++++++++++++++++++++++++++++++---------------- m4/printf-posix.m4 | 6 +++--- m4/uintmax_t.m4 | 8 ++++---- m4/wint_t.m4 | 14 +++++++++++--- po/Makefile.in.in | 42 ++++++++++++++++++++++++++++++++++-------- 6 files changed, 83 insertions(+), 35 deletions(-) diff --git a/configure.ac b/configure.ac index e6c025dea..e100f2654 100644 --- a/configure.ac +++ b/configure.ac @@ -207,7 +207,7 @@ if test "x$enable_iconvtest" != xno; then fi AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.16.1]) +AM_GNU_GETTEXT_VERSION([0.17]) AC_PROG_GMSGFMT_PLURAL AC_CHECK_FUNCS([nl_langinfo]) diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 index b8d78176a..8c8a67084 100644 --- a/m4/intdiv0.m4 +++ b/m4/intdiv0.m4 @@ -1,5 +1,5 @@ -# intdiv0.m4 serial 1 (gettext-0.11.3) -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# intdiv0.m4 serial 2 (gettext-0.17) +dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -14,16 +14,27 @@ AC_DEFUN([gt_INTDIV0], AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ - AC_TRY_RUN([ + gt_cv_int_divbyzero_sigfpe= +changequote(,)dnl + case "$host_os" in + macos* | darwin[6-9]* | darwin[1-9][0-9]*) + # On MacOS X 10.2 or newer, just assume the same as when cross- + # compiling. If we were to perform the real test, 1 Crash Report + # dialog window would pop up. + case "$host_cpu" in + i[34567]86 | x86_64) + gt_cv_int_divbyzero_sigfpe="guessing yes" ;; + esac + ;; + esac +changequote([,])dnl + if test -z "$gt_cv_int_divbyzero_sigfpe"; then + AC_TRY_RUN([ #include #include static void -#ifdef __cplusplus sigfpe_handler (int sig) -#else -sigfpe_handler (sig) int sig; -#endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); @@ -51,15 +62,18 @@ int main () exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, - [ - # Guess based on the CPU. - case "$host_cpu" in - alpha* | i[34567]86 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac - ]) + [ + # Guess based on the CPU. +changequote(,)dnl + case "$host_cpu" in + alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac +changequote([,])dnl + ]) + fi ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4 index af10170af..14ba61283 100644 --- a/m4/printf-posix.m4 +++ b/m4/printf-posix.m4 @@ -1,5 +1,5 @@ -# printf-posix.m4 serial 2 (gettext-0.13.1) -dnl Copyright (C) 2003 Free Software Foundation, Inc. +# printf-posix.m4 serial 3 (gettext-0.17) +dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -28,7 +28,7 @@ int main () }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, [ AC_EGREP_CPP(notposix, [ -#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ +#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ notposix #endif ], gt_cv_func_printf_posix="guessing no", diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 index bf83ed746..641c4898d 100644 --- a/m4/uintmax_t.m4 +++ b/m4/uintmax_t.m4 @@ -1,5 +1,5 @@ -# uintmax_t.m4 serial 9 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. +# uintmax_t.m4 serial 10 +dnl Copyright (C) 1997-2004, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -16,8 +16,8 @@ AC_DEFUN([gl_AC_TYPE_UINTMAX_T], AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - test $ac_cv_type_unsigned_long_long = yes \ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + test $ac_cv_type_unsigned_long_long_int = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 index b8fff9c86..af5ed936c 100644 --- a/m4/wint_t.m4 +++ b/m4/wint_t.m4 @@ -1,5 +1,5 @@ -# wint_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2003 Free Software Foundation, Inc. +# wint_t.m4 serial 2 (gettext-0.17) +dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,7 +11,15 @@ dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, - [AC_TRY_COMPILE([#include + [AC_TRY_COMPILE([ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include wint_t foo = (wchar_t)'\0';], , gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) if test $gt_cv_c_wint_t = yes; then diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 5022b8b18..fecf500f3 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -1,5 +1,5 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper +# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -8,7 +8,8 @@ # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # -# Origin: gettext-0.16 +# Origin: gettext-0.17 +GETTEXT_MACRO_VERSION = 0.17 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -95,11 +96,18 @@ CATALOGS = @CATALOGS@ mv t-$@ $@ -all: all-@USE_NLS@ +all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: +# Ensure that the gettext macros and this Makefile.in.in are in sync. +check-macro-version: + @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ + || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ + exit 1; \ + } + # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that @@ -130,16 +138,34 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ + package_gnu='GNU '; \ + else \ + package_gnu=''; \ + fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ - --files-from=$(srcdir)/POTFILES.in \ - --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --msgid-bugs-address="$$msgid_bugs_address" + case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + ;; \ + *) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --package-name="$${package_gnu}@PACKAGE@" \ + --package-version='@VERSION@' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + ;; \ + esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ -- cgit v1.2.3