This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

intl patches (6)



This patch avoids build failures on K&R C compilers, like SunOS 4 cc.
It is necessary because GCC (which integrates libintl) must be buildable
with K&R C compilers.

This patch doesn't cause behaviour changes in glibc.


2001-01-05  Bruno Haible  <haible@clisp.cons.org>

	* intl/bindtextdom.c (set_binding_values): Convert prototype to K&R C
	syntax.
	* intl/dcigettext.c (transcmp): Convert to K&R C syntax.
	* intl/explodename.c (_nl_find_language): Convert to K&R C syntax.
	* intl/plural.y (__gettext_free_exp, yylex, yyerror): Convert to K&R C
	syntax.

diff -r -c3 intl/bindtextdom.c intl/bindtextdom.c
*** intl/bindtextdom.c	Sat Mar 17 17:42:23 2001
--- intl/bindtextdom.c	Sat Mar 17 18:23:23 2001
***************
*** 97,104 ****
  #endif
  
  /* Prototypes for local functions.  */
! static void set_binding_values (const char *domainname, const char **dirnamep,
! 				const char **codesetp);
       
  /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
     to be used for the DOMAINNAME message catalog.
--- 97,105 ----
  #endif
  
  /* Prototypes for local functions.  */
! static void set_binding_values PARAMS ((const char *domainname,
! 					const char **dirnamep,
! 					const char **codesetp));
       
  /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
     to be used for the DOMAINNAME message catalog.
diff -r -c3 intl/dcigettext.c intl/dcigettext.c
*** intl/dcigettext.c	Sat Mar 17 18:17:46 2001
--- intl/dcigettext.c	Sat Mar 17 18:23:23 2001
***************
*** 237,244 ****
  # endif
  
  /* Function to compare two entries in the table of known translations.  */
  static int
! transcmp (const void *p1, const void *p2)
  {
    const struct known_translation_t *s1;
    const struct known_translation_t *s2;
--- 237,247 ----
  # endif
  
  /* Function to compare two entries in the table of known translations.  */
+ static int transcmp PARAMS ((const void *p1, const void *p2));
  static int
! transcmp (p1, p2)
!      const void *p1;
!      const void *p2;
  {
    const struct known_translation_t *s1;
    const struct known_translation_t *s2;
diff -r -c3 intl/explodename.c intl/explodename.c
*** intl/explodename.c	Mon Feb 28 11:34:04 2000
--- intl/explodename.c	Sat Mar 17 18:23:23 2001
***************
*** 1,4 ****
! /* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
     Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
  
     The GNU C Library is free software; you can redistribute it and/or
--- 1,4 ----
! /* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
     Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
  
     The GNU C Library is free software; you can redistribute it and/or
***************
*** 45,51 ****
  /* @@ end of prolog @@ */
  
  char *
! _nl_find_language (const char *name)
  {
    while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
  	 && name[0] != '+' && name[0] != ',')
--- 45,52 ----
  /* @@ end of prolog @@ */
  
  char *
! _nl_find_language (name)
!      const char *name;
  {
    while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
  	 && name[0] != '+' && name[0] != ',')
diff -r -c3 intl/plural.y intl/plural.y
*** intl/plural.y	Sat Mar 17 17:12:55 2001
--- intl/plural.y	Sat Mar 17 18:24:05 2001
***************
*** 169,175 ****
  
  void
  internal_function
! __gettext_free_exp (struct expression *exp)
  {
    if (exp == NULL)
      return;
--- 169,176 ----
  
  void
  internal_function
! __gettext_free_exp (exp)
!      struct expression *exp;
  {
    if (exp == NULL)
      return;
***************
*** 203,209 ****
  
  
  static int
! yylex (YYSTYPE *lval, const char **pexp)
  {
    const char *exp = *pexp;
    int result;
--- 204,212 ----
  
  
  static int
! yylex (lval, pexp)
!      YYSTYPE *lval;
!      const char **pexp;
  {
    const char *exp = *pexp;
    int result;
***************
*** 298,304 ****
  
  
  static void
! yyerror (const char *str)
  {
    /* Do nothing.  We don't print error messages here.  */
  }
--- 301,308 ----
  
  
  static void
! yyerror (str)
!      const char *str;
  {
    /* Do nothing.  We don't print error messages here.  */
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]