[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] PATCH: fix powerpc build w/wide char options disabled



The attached patch fixes build problems for the powerpc target when OPTION_POSIX_C_LANG_WIDE_CHAR and/or OPTION_POSIX_WIDE_CHAR_DEVICE_IO are disabled.

OK to commit?

-Sandra

2007-12-14  Sandra Loosemore  <sandra@xxxxxxxxxxxxxxxx>

	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls):
	Move fwprintf fwscanf vfwprintf vfwscanf vwprintf vwscanf wprintf
	wscanf fwprintf_chk vfwprintf_chk vwprintf_chk wprintf_chk
	isoc99_wscanf isoc99_fwscanf isoc99_vwscanf isoc99_vfwscanf
	to group OPTION_POSIX_WIDE_CHAR_DEVICE_IO.
	Move swprintf swscanf vswprintf vswscanf swprintf_chk vswprintf_chk
	isoc99_swscanf isoc99_vswscanf to group OPTION_POSIX_C_LANG_WIDE_CHAR.

	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c (__nldbl_fwprintf,
	__nldbl_fwscanf, __nldbl_vfwprintf, __nldbl_vfwscanf,
	__nldbl_vwprintf, __nldbl_vwscanf, __nldbl_wprintf, __nldbl_wscanf,
	__nldbl_fwprintf_chk, __nldbl_vfwprintf_chk, __nldbl_vwprintf_chk,
	__nldbl_wprintf_chk, __nldbl_isoc99_wscanf, __nldbl_isoc99_fwscanf,
	__nldbl_isoc99_vwscanf,	__nldbl_isoc99_vfwscanf): Make conditional on
	__OPTION_POSIX_WIDE_CHAR_DEVICE_IO.
	(__nldbl_swprintf, __nldbl_swscanf, __nldbl_vswprintf,
	__nldbl_vswscanf, __nldbl_swprintf_chk, __nldbl_vswprintf_chk,
	__nldbl_isoc99_swscanf, __nldbl_isoc99_vswscanf): Make conditional on
	__OPTION_POSIX_C_LANG_WIDE_CHAR.
Index: sysdeps/ieee754/ldbl-opt/Makefile
===================================================================
*** sysdeps/ieee754/ldbl-opt/Makefile	(revision 4539)
--- sysdeps/ieee754/ldbl-opt/Makefile	(working copy)
*************** libm-routines += s_nexttowardfd
*** 11,26 ****
  routines += math_ldbl_opt nldbl-compat
  
  extra-libs += libnldbl
! libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
  		 obstack_printf obstack_vprintf printf scanf snprintf \
! 		 sprintf sscanf swprintf swscanf vasprintf vdprintf vfprintf \
! 		 vfscanf vfwprintf vfwscanf vprintf vscanf vsnprintf \
! 		 vsprintf vsscanf vswprintf vswscanf vwprintf vwscanf \
! 		 wprintf wscanf printf_fp printf_size \
! 		 fprintf_chk fwprintf_chk printf_chk snprintf_chk sprintf_chk \
! 		 swprintf_chk vfprintf_chk vfwprintf_chk vprintf_chk \
! 		 vsnprintf_chk vsprintf_chk vswprintf_chk vwprintf_chk \
! 		 wprintf_chk \
  		 syslog syslog_chk vsyslog vsyslog_chk \
  		 strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \
  		 qecvt qfcvt qgcvt qecvt_r qfcvt_r \
--- 11,25 ----
  routines += math_ldbl_opt nldbl-compat
  
  extra-libs += libnldbl
! libnldbl-calls = asprintf dprintf fprintf fscanf iovfscanf \
  		 obstack_printf obstack_vprintf printf scanf snprintf \
! 		 sprintf sscanf vasprintf vdprintf vfprintf \
! 		 vfscanf vprintf vscanf vsnprintf \
! 		 vsprintf vsscanf \
! 		 printf_fp printf_size \
! 		 fprintf_chk printf_chk snprintf_chk sprintf_chk \
! 		 vfprintf_chk vprintf_chk \
! 		 vsnprintf_chk vsprintf_chk \
  		 syslog syslog_chk vsyslog vsyslog_chk \
  		 strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \
  		 qecvt qfcvt qgcvt qecvt_r qfcvt_r \
*************** libnldbl-calls = asprintf dprintf fprint
*** 36,45 ****
  		 casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \
  		 cabs carg cimag creal clog10 \
  		 isoc99_scanf isoc99_fscanf isoc99_sscanf \
! 		 isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
! 		 isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
! 		 isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf
  libnldbl-calls-$(OPTION_EGLIBC_LOCALE_CODE) += strfmon strfmon_l
  libnldbl-calls += $(libnldbl-calls-y)
  libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
  libnldbl-inhibit-o = $(object-suffixes)
--- 35,54 ----
  		 casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \
  		 cabs carg cimag creal clog10 \
  		 isoc99_scanf isoc99_fscanf isoc99_sscanf \
! 		 isoc99_vscanf isoc99_vfscanf isoc99_vsscanf
  libnldbl-calls-$(OPTION_EGLIBC_LOCALE_CODE) += strfmon strfmon_l
+ libnldbl-calls-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \
+ 	fwprintf fwscanf \
+ 	vfwprintf vfwscanf \
+ 	vwprintf vwscanf \
+ 	wprintf wscanf \
+ 	fwprintf_chk vfwprintf_chk vwprintf_chk wprintf_chk \
+ 	isoc99_wscanf isoc99_fwscanf isoc99_vwscanf isoc99_vfwscanf 
+ libnldbl-calls-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
+ 	swprintf swscanf \
+ 	vswprintf vswscanf \
+ 	swprintf_chk vswprintf_chk \
+ 	isoc99_swscanf isoc99_vswscanf
  libnldbl-calls += $(libnldbl-calls-y)
  libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
  libnldbl-inhibit-o = $(object-suffixes)
Index: sysdeps/ieee754/ldbl-opt/nldbl-compat.c
===================================================================
*** sysdeps/ieee754/ldbl-opt/nldbl-compat.c	(revision 4539)
--- sysdeps/ieee754/ldbl-opt/nldbl-compat.c	(working copy)
*************** __nldbl_fprintf (FILE *stream, const cha
*** 115,120 ****
--- 115,121 ----
  }
  weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section weak_function
  __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
*************** __nldbl_fwprintf (FILE *stream, const wc
*** 128,133 ****
--- 129,135 ----
  
    return done;
  }
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl_snprintf (char *s, size_t maxlen
*** 224,229 ****
--- 226,232 ----
    return done;
  }
  
+ #if __OPTION_POSIX_C_LANG_WIDE_CHAR
  int
  attribute_compat_text_section
  __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
*************** __nldbl_swprintf (wchar_t *s, size_t n, 
*** 237,242 ****
--- 240,246 ----
  
    return done;
  }
+ #endif
  
  int
  attribute_compat_text_section weak_function
*************** __nldbl_vdprintf (int d, const char *fmt
*** 262,267 ****
--- 266,272 ----
  }
  libc_hidden_def (__nldbl_vdprintf)
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section weak_function
  __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
*************** __nldbl_vfwprintf (FILE *s, const wchar_
*** 273,278 ****
--- 278,284 ----
    return res;
  }
  libc_hidden_def (__nldbl_vfwprintf)
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl_vsnprintf (char *string, size_t 
*** 295,300 ****
--- 301,307 ----
  libc_hidden_def (__nldbl_vsnprintf)
  weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
  
+ #if __OPTION_POSIX_C_LANG_WIDE_CHAR
  int
  attribute_compat_text_section weak_function
  __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
*************** __nldbl_vswprintf (wchar_t *string, size
*** 307,313 ****
--- 314,322 ----
    return res;
  }
  libc_hidden_def (__nldbl_vswprintf)
+ #endif
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl_vwprintf (const wchar_t *fmt, va_list ap)
*************** __nldbl_wprintf (const wchar_t *fmt, ...
*** 328,333 ****
--- 337,343 ----
  
    return done;
  }
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl_scanf (const char *fmt, ...)
*** 417,422 ****
--- 427,433 ----
    return done;
  }
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
*************** __nldbl_vfwscanf (FILE *s, const wchar_t
*** 428,434 ****
--- 439,447 ----
    return res;
  }
  libc_hidden_def (__nldbl_vfwscanf)
+ #endif
  
+ #if __OPTION_POSIX_C_LANG_WIDE_CHAR
  int
  attribute_compat_text_section
  __nldbl_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
*************** __nldbl_vswscanf (const wchar_t *string,
*** 454,460 ****
--- 467,475 ----
    return res;
  }
  libc_hidden_def (__nldbl_vswscanf)
+ #endif
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section weak_function
  __nldbl_vwscanf (const wchar_t *fmt, va_list ap)
*************** __nldbl_wscanf (const wchar_t *fmt, ...)
*** 489,494 ****
--- 504,510 ----
  
    return done;
  }
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl___fprintf_chk (FILE *stream, int
*** 504,509 ****
--- 520,526 ----
    return done;
  }
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
*************** __nldbl___fwprintf_chk (FILE *stream, in
*** 517,522 ****
--- 534,540 ----
  
    return done;
  }
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl___sprintf_chk (char *s, int flag
*** 561,566 ****
--- 579,585 ----
    return done;
  }
  
+ #if __OPTION_POSIX_C_LANG_WIDE_CHAR
  int
  attribute_compat_text_section
  __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
*************** __nldbl___swprintf_chk (wchar_t *s, size
*** 575,580 ****
--- 594,600 ----
  
    return done;
  }
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl___vfprintf_chk (FILE *s, int fla
*** 588,593 ****
--- 608,614 ----
  }
  libc_hidden_def (__nldbl___vfprintf_chk)
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
*************** __nldbl___vfwprintf_chk (FILE *s, int fl
*** 599,604 ****
--- 620,626 ----
    return res;
  }
  libc_hidden_def (__nldbl___vfwprintf_chk)
+ #endif
  
  int
  attribute_compat_text_section
*************** __nldbl___vsprintf_chk (char *string, in
*** 633,638 ****
--- 655,661 ----
  }
  libc_hidden_def (__nldbl___vsprintf_chk)
  
+ #if __OPTION_POSIX_C_LANG_WIDE_CHAR
  int
  attribute_compat_text_section
  __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
*************** __nldbl___vswprintf_chk (wchar_t *string
*** 645,651 ****
--- 668,676 ----
    return res;
  }
  libc_hidden_def (__nldbl___vswprintf_chk)
+ #endif
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl___vwprintf_chk (int flag, const wchar_t *fmt, va_list ap)
*************** __nldbl___wprintf_chk (int flag, const w
*** 666,671 ****
--- 691,697 ----
  
    return done;
  }
+ #endif
  
  extern __typeof (printf_size) __printf_size;
  
*************** __nldbl___isoc99_scanf (const char *fmt,
*** 861,866 ****
--- 887,893 ----
    return done;
  }
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
*************** __nldbl___isoc99_vfwscanf (FILE *s, cons
*** 872,878 ****
--- 899,907 ----
    return res;
  }
  libc_hidden_def (__nldbl___isoc99_vfwscanf)
+ #endif
  
+ #if __OPTION_POSIX_C_LANG_WIDE_CHAR
  int
  attribute_compat_text_section
  __nldbl___isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
*************** __nldbl___isoc99_vswscanf (const wchar_t
*** 899,905 ****
--- 928,936 ----
    return res;
  }
  libc_hidden_def (__nldbl___isoc99_vswscanf)
+ #endif
  
+ #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
  int
  attribute_compat_text_section
  __nldbl___isoc99_vwscanf (const wchar_t *fmt, va_list ap)
*************** __nldbl___isoc99_wscanf (const wchar_t *
*** 934,939 ****
--- 965,971 ----
  
    return done;
  }
+ #endif
  
  #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
  compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);