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

[plamo:24737] Re: glibc の入れ替え



 こんにちは清水と申します。
結局glibcがmakeされてないみたいなので

> 実は,glibc-2.3.2 の make は,(GCC をバージョンアップして)できるようになっ
> たのですが,コンパイルエラーが起こってしまい,作成できませんでしたので.
> (本文の最後にログを添付させて頂きます):-)

> ---------------------------------------------------------------------------
> gcc sscanf.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g      -I../include -I. -I/home/matsui/gnu/glibc-2.3.2/linux/stdio-common -I.. -I../libio  -I/home/matsui/gnu/glibc-2.3.2/linux -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee75!
4/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -I /lib/modules/2.4.20/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -D_IO_MTSAFE_IO -o /home/matsui/gnu/glibc-2.3.2/linux/stdio-common/sscanf.o
> sscanf.c:31: 警告: conflicting types for built-in function `sscanf'
この一行をgoogleでさがすとたくさんでてきます。

> sscanf.c: 関数 `sscanf' 内:
> sscanf.c:37: error: `va_start' used in function with fixed args
> ../stdio-common/_itoa.h: トップレベル:
> ../stdio-common/_itoa.h:40: 警告: inlining failed in call to `_itoa_word'
> ../stdio-common/_itoa.h:76: 警告: called from here
> make[2]: *** [/home/matsui/gnu/glibc-2.3.2/linux/stdio-common/sscanf.o] Error 1
//glibc-2.3.2

glibc-2.3.2/stdio-common/sscanf.c
/* Read formatted input from S, according to the format string FORMAT.  */
/* VARARGS2 */
int
sscanf (s, format)
     const char *s;
     const char *format;
{
  va_list arg;
  int done;

  va_start (arg, format);
  done = __vsscanf (s, format, arg);
  va_end (arg);

  return done;
}

最新のglibc-2.3.4では
glibc-2.3.4/stdio-common/sscanf.c
/* Read formatted input from S, according to the format string FORMAT.  */
/* VARARGS2 */
int
sscanf (const char *s, const char *format, ...)
{
  va_list arg;
  int done;

  va_start (arg, format);
  done = __vsscanf (s, format, arg);
  va_end (arg);

  return done;
}

書きかたが違います。

下のほうがC言語辞典(平林雅英著)風です
--
清水信秀

Follow-Ups
[plamo:24741] Re: glibc の入れ替え, A Matsui
References
[plamo:24709] Re: glibc の入れ替え, A Matsui
[plamo:24713] Re: glibcの入れ替え, KIDO Hideyuki
[plamo:24723] Re: glibc の入れ替え, A Matsui
[plamo:24725] Re: glibcの入れ替え, KIDO Hideyuki
[plamo:24733] Re: glibc の入れ替え, A Matsui

[検索ページ] [メール一覧]
Plamo ML 公開システム