浏览代码

add some ugly aliases for LSB ABI compatibility

for some nonsensical reason, glibc's headers use inline functions that
redirect some of the standard functions to ugly nonstandard names (and
likewise for some of their nonstandard functions).
Rich Felker 12 年之前
父节点
当前提交
6a4b9472fb
共有 7 个文件被更改,包括 8 次插入0 次删除
  1. 1 0
      src/stdio/feof.c
  2. 1 0
      src/stdio/ferror.c
  3. 1 0
      src/stdio/fgetc.c
  4. 1 0
      src/stdio/fputc.c
  5. 1 0
      src/stdio/getc_unlocked.c
  6. 2 0
      src/stdio/getdelim.c
  7. 1 0
      src/stdio/putc_unlocked.c

+ 1 - 0
src/stdio/feof.c

@@ -8,3 +8,4 @@ int feof(FILE *f)
 }
 
 weak_alias(feof, feof_unlocked);
+weak_alias(feof, _IO_feof_unlocked);

+ 1 - 0
src/stdio/ferror.c

@@ -8,3 +8,4 @@ int ferror(FILE *f)
 }
 
 weak_alias(ferror, ferror_unlocked);
+weak_alias(ferror, _IO_ferror_unlocked);

+ 1 - 0
src/stdio/fgetc.c

@@ -11,3 +11,4 @@ int fgetc(FILE *f)
 }
 
 weak_alias(fgetc, getc);
+weak_alias(fgetc, _IO_getc);

+ 1 - 0
src/stdio/fputc.c

@@ -10,3 +10,4 @@ int fputc(int c, FILE *f)
 }
 
 weak_alias(fputc, putc);
+weak_alias(fputc, _IO_putc);

+ 1 - 0
src/stdio/getc_unlocked.c

@@ -6,3 +6,4 @@ int (getc_unlocked)(FILE *f)
 }
 
 weak_alias (getc_unlocked, fgetc_unlocked);
+weak_alias (getc_unlocked, _IO_getc_unlocked);

+ 2 - 0
src/stdio/getdelim.c

@@ -57,3 +57,5 @@ oom:
 	errno = ENOMEM;
 	return -1;
 }
+
+weak_alias(getdelim, __getdelim);

+ 1 - 0
src/stdio/putc_unlocked.c

@@ -6,3 +6,4 @@ int (putc_unlocked)(int c, FILE *f)
 }
 
 weak_alias(putc_unlocked, fputc_unlocked);
+weak_alias(putc_unlocked, _IO_putc_unlocked);