From: Bruno Haible Date: Fri, 26 Oct 2001 09:14:36 +0000 (+0000) Subject: Use putc_unlocked instead of putc when possible, for speed. X-Git-Tag: v0.11~403 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=588ca4f6008603338e0f537671b5f751d0f5554e;p=thirdparty%2Fgettext.git Use putc_unlocked instead of putc when possible, for speed. --- diff --git a/ChangeLog b/ChangeLog index c503761ec..be1d0b993 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-10-09 Bruno Haible + + * configure.in: Also check for putc_unlocked. + 2001-10-21 Bruno Haible * Makefile.am (SUBDIRS): Add projects. diff --git a/configure.in b/configure.in index 82a40b17c..d6740bcfa 100644 --- a/configure.in +++ b/configure.in @@ -66,8 +66,8 @@ AC_TYPE_PID_T dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_VPRINTF -AC_CHECK_FUNCS([getcwd mblen memcpy posix_spawn raise select strerror uname \ -utime utimes]) +AC_CHECK_FUNCS([getcwd mblen memcpy posix_spawn putc_unlocked raise select \ +strerror uname utime utimes]) AC_REPLACE_FUNCS([memset stpcpy stpncpy strcspn \ strcasecmp strncasecmp strpbrk strstr strtoul vasprintf]) AM_FUNC_GETLINE diff --git a/src/ChangeLog b/src/ChangeLog index ed9665c52..8cb3200ee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-10-09 Bruno Haible + + * write-po.c (putc): Define as putc_unlocked if available. + 2001-10-09 Bruno Haible * po-lex.c (getc): Define as getc_unlocked if available. diff --git a/src/write-po.c b/src/write-po.c index f3cec17b0..7e94a458f 100644 --- a/src/write-po.c +++ b/src/write-po.c @@ -44,10 +44,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "xerror.h" #include "libgettext.h" - /* Our regular abbreviation. */ #define _(str) gettext (str) +#ifdef HAVE_PUTC_UNLOCKED +# undef putc +# define putc putc_unlocked +#endif + /* Prototypes for local functions. Needed to ensure compiler checking of function argument counts despite of K&R C function definition syntax. */