Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808225/?format=api
{ "id": 808225, "url": "http://patchwork.ozlabs.org/api/patches/808225/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/4919e435-9006-dd2d-8811-2a732f9fdac7@redhat.com/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<4919e435-9006-dd2d-8811-2a732f9fdac7@redhat.com>", "list_archive_url": null, "date": "2017-08-31T12:14:23", "name": "libio: Assume _LIBC, weak_alias, errno, (__set_)errno &c are defined", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "102d12ffb043fac8bc139e64ca22c80760fa7413", "submitter": { "id": 14312, "url": "http://patchwork.ozlabs.org/api/people/14312/?format=api", "name": "Florian Weimer", "email": "fweimer@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/4919e435-9006-dd2d-8811-2a732f9fdac7@redhat.com/mbox/", "series": [ { "id": 814, "url": "http://patchwork.ozlabs.org/api/series/814/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=814", "date": "2017-08-31T12:14:23", "name": "libio: Assume _LIBC, weak_alias, errno, (__set_)errno &c are defined", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/814/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808225/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808225/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-return-83911-incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "mailing list libc-alpha@sourceware.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-83911-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"MlHNKtvv\"; dkim-atps=neutral", "sourceware.org; auth=none", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=fweimer@redhat.com" ], "Received": [ "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjhBx4t72z9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 22:14:49 +1000 (AEST)", "(qmail 48416 invoked by alias); 31 Aug 2017 12:14:38 -0000", "(qmail 48386 invoked by uid 89); 31 Aug 2017 12:14:38 -0000" ], "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:to:from:subject:message-id:date:mime-version\n\t:content-type; q=dns; s=default; b=xwordf1Py8G+DpMUKtbtAu5o8OSOH\n\twRTVSfG8skfhOzMAsWzO9w5cwIZm4zNuqwV8Lva2Dri+MVj+ye76UAuzInC6+j7U\n\t9brYnjCAK1wWigza4ZrfkVD1snsaTALEuxE48n+cS4gdQqzPIV1JgRClQdmyQj+w\n\te6111CuUy8/9Sg=", "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:to:from:subject:message-id:date:mime-version\n\t:content-type; s=default; bh=NlB+mB904y8zMTeOz+fG10w2kdY=; b=MlH\n\tNKtvvQbiny9+15Uo6LO4sGz9UjO0DqKlDWNmcIcdb2B8xPfpIHX0k4kOiqVapuId\n\tZyQQyAIgjbRrsFdE3RpkQbFs9aedEGITRJX0iTubQEJbFGw5eWw+UsDYbXG2+mkp\n\thTDwFJ4AGgQddGKGP5Y+IeOkivSF6sD9vXhJpNGA=", "Mailing-List": "contact libc-alpha-help@sourceware.org; run by ezmlm", "Precedence": "bulk", "List-Id": "<libc-alpha.sourceware.org>", "List-Unsubscribe": "<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>", "List-Subscribe": "<mailto:libc-alpha-subscribe@sourceware.org>", "List-Archive": "<http://sourceware.org/ml/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>", "Sender": "libc-alpha-owner@sourceware.org", "X-Virus-Found": "No", "X-Spam-SWARE-Status": "No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=", "X-HELO": "mx1.redhat.com", "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com C942C267C6", "To": "GNU C Library <libc-alpha@sourceware.org>", "From": "Florian Weimer <fweimer@redhat.com>", "Subject": "[PATCH] libio: Assume _LIBC, weak_alias, errno, (__set_)errno &c are\n\tdefined", "Message-ID": "<4919e435-9006-dd2d-8811-2a732f9fdac7@redhat.com>", "Date": "Thu, 31 Aug 2017 14:14:23 +0200", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1", "MIME-Version": "1.0", "Content-Type": "multipart/mixed;\n\tboundary=\"------------DB254CED824E8D93DE7ED168\"" }, "content": "libio lives exclusively in glibc these days, so there is no reason to\npreserve _LIBC conditionals.\n\nWhile at it, I also removed some unnecessary indirections and conditions\non other always-defined macros (F_GETFL, EIO, etc.).\n\nI checked that this does not change the produced binaries on i686.\n\nThanks,\nFlorian", "diff": "libio: Assume _LIBC, weak_alias, errno, (__set_)errno &c are defined\n\nDo not define _POSIX_SOURCE.\n\n2017-08-31 Florian Weimer <fweimer@redhat.com>\n\n\t* libio/fcloseall.c: Assume weak_alias is defined.\n\t* libio/feof.c: Likewise.\n\t* libio/fileno.c: Likewise.\n\t* libio/fileops.c: Assume _LIBC, errno, __set_errno are defined.\n\t(_POSIX_SOURCE, open, lseek, read, write): Remove macro\n\tdefinitions.\n\t(_IO_file_open): Call __open directly.\n\t(_IO_new_file_sync): Assume ESPIPE is defined.\n\t(_IO_file_seekoff_maybe_mmap): Call __read directly.\n\t(_IO_new_file_write): Call __write directly.\n\t* libio/ftello.c (__ftello): Assume EIO, EOVERFLOW are defined.\n\t* libio/ftello64.c (__ftello64): Assume EIO is defined.\n\t* libio/genops.c: Assume _LIBC is defined.\n\t(save_for_backup): Remove internal_function.\n\t* libio/getc.c: Assume weak_alias is defined.\n\t* libio/getwc.c: Likewise.\n\t* libio/iofclose.c: Assume _LIBC is defined.\n\t* libio/iofdopen.c: Likewise.\n\t(_IO_fcntl): Remove macro definition.\n\t(_IO_new_fdopen): Assume F_GETFL, F_SETFL, O_ACCMODE are defined.\n\tCall __fcntl directly.\n\t* libio/iofflush.c: Assume weak_alias is defined.\n\t* libio/iofgetpos.c (_IO_new_fgetpos): Assume EIO, EOVERFLOW are\n\tdefined.\n\t* libio/iofgetpos64.c (_IO_new_fgetpos64): Assume EIO is defined.\n\t* libio/iofgets.c: Likewise.\n\t* libio/iofopen.c: Assume _LIBC is defined.\n\t* libio/iofopen64.c: Assume _LIBC, weak_alias are defined.\n\t* libio/iofputs.c: Assume weak_alias is defined.\n\t* libio/iofread.c: Likewise.\n\t* libio/iofsetpos.c (_IO_new_fsetpos): Assume EIO is defined.\n\t* libio/iofsetpos64.c (_IO_new_fsetpos64): Likewise.\n\t* libio/ioftell.c: Assume weak_alias is defined.\n\t(_IO_ftell): Assume EIO, EOVERFLOW are defined.\n\t* libio/iofwide.c: Assume _LIBC is defined.\n\t(_IO_fwide): Drop SHARED conditional because it is implied by\n\tSHLIB_COMPAT.\n\t* libio/iofwrite.c: Assume weak_alias is defined.\n\t* libio/iogetdelim.c: Likewise.\n\t* libio/iogets.c: Assume _LIBC, weak_alias are defined.\n\t* libio/iogetwline.c (wmemcpy): Remove macro definition.\n\t(_IO_getwline): Call __wmemcpy directly.\n\t* libio/iopopen.c: Assume _LIBC is defined.\n\t(_POSIX_SOURCE, _IO_fork, _IO_dup2, _IO_waitpid, _IO_execl)\n\t(_IO_close): Remove macro definitions.\n\t(_IO_new_proc_open): Call __fork, __dup2, __close_nocancel, execl,\n\t_exit directly.\n\t(_IO_new_proc_close): Call __close_nocancel, __waitpid_nocancel\n\tdirectly.\n\t* libio/ioputs.c: Assume weak_alias is defined.\n\t* libio/ioseekoff.c: Assume errno, __set_errno are defined.\n\t* libio/iosetbuffer.c: Assume weak_alias is defined.\n\t* libio/iosetvbuf.c: Likewise.\n\t* libio/ioungetc.c: Likewise.\n\t* libio/libioP.h: Assume _LIBC, __GLIBC__, libc_hidden_proto,\n\tlibc_hidden_def, libc_hidden_weak, NULL are defined.\n\t(mmap, munmap, ftruncate, OS_FSTAT): Remove macro definitions.\n\t* libio/oldfilepos.c: Assume _LIBC, errno, __set_errno are\n\tdefined.\n\t(_POSIX_SOURCE, open, lseek, read, write): Remove macro\n\tdefinitions.\n\t(_IO_old_file_init_internal): Drop SHARED conditional because it\n\tis implied by SHLIB_COMPAT.\n\t(_IO_old_file_fopen): Call __open directly.\n\t(_IO_old_file_sync): Assume ESPIPE is defined.\n\t(_IO_old_file_write): Call __write directly.\n\t* libio/oldfdopen.c (_IO_fcntl): Remove macro definition.\n\t(_IO_old_fdopen): Assume F_GETFL, O_ACCMODE, F_SETFL are defined.\n\tCall __fcntl directly.\n\t* libio/oldiofgetpos.c: Assume weak_alias is defined.\n\t(_IO_old_fgetpos): Assume EIO is defined.\n\t* libio/oldiofgetpos64.c: Assume weak_alias is defined.\n\t(_IO_old_fgetpos64): Assume EIO is defined.\n\t* libio/oldiofsetpos.c: Assume weak_alias is defined.\n\t(_IO_old_fsetpos): Assume EIO is defined.\n\t* libio/oldiofsetpos64.c: Assume weak_alias is defined.\n\t(_IO_old_fsetpos64): Assume EIO is defined.\n\t* libio/oldiopopen.c: Assume _LIBC is defined.\n\t(_POSIX_SOURCE, _IO_fork, _IO_dup2, _IO_waitpid, _IO_execl)\n\t(_IO_close): Remove macro definitions.\n\t(_IO_old_proc_open): Call __pipe, __close, __dup2, execl, _exit\n\tdirectly.\n\t(_IO_old_proc_close): Call __close, __waitpid directly.\n\t* libio/put.c: Assume weak_alias is defined.\n\t* libio/stdfiles.c: Assume _LIBC is defined.\n\t* libio/stdio.c: Likewise.\n\t* libio/wfileops.c: Likewise.\n\t(_IO_wfile_sync): Assume ESPIPE is defined.\n\t* libio/wgenops.c: Assume _LIBC is defined.\n\t(save_for_wbackup): Remove internal_function.\n\ndiff --git a/libio/fcloseall.c b/libio/fcloseall.c\nindex 59c33ccf48..80e1ae01d7 100644\n--- a/libio/fcloseall.c\n+++ b/libio/fcloseall.c\n@@ -34,6 +34,4 @@ __fcloseall (void)\n return _IO_cleanup ();\n }\n \n-#ifdef weak_alias\n weak_alias (__fcloseall, fcloseall)\n-#endif\ndiff --git a/libio/feof.c b/libio/feof.c\nindex 8890a5f51f..72dde1f82d 100644\n--- a/libio/feof.c\n+++ b/libio/feof.c\n@@ -40,11 +40,9 @@ _IO_feof (_IO_FILE *fp)\n return result;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_feof, feof)\n \n #ifndef _IO_MTSAFE_IO\n #undef feof_unlocked\n weak_alias (_IO_feof, feof_unlocked)\n #endif\n-#endif\ndiff --git a/libio/ferror.c b/libio/ferror.c\nindex d10fcd9fff..ab6185bade 100644\n--- a/libio/ferror.c\n+++ b/libio/ferror.c\n@@ -40,11 +40,9 @@ _IO_ferror (_IO_FILE *fp)\n return result;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_ferror, ferror)\n \n #ifndef _IO_MTSAFE_IO\n #undef ferror_unlocked\n weak_alias (_IO_ferror, ferror_unlocked)\n #endif\n-#endif\ndiff --git a/libio/fileno.c b/libio/fileno.c\nindex b78d4a1461..d4d749d4d0 100644\n--- a/libio/fileno.c\n+++ b/libio/fileno.c\n@@ -44,10 +44,8 @@ libc_hidden_def (__fileno)\n weak_alias (__fileno, fileno)\n libc_hidden_weak (fileno)\n \n-#ifdef weak_alias\n /* The fileno implementation for libio does not require locking because\n it only accesses once a single variable and this is already atomic\n (at least at thread level). Therefore we don't test _IO_MTSAFE_IO here. */\n \n weak_alias (__fileno, fileno_unlocked)\n-#endif\ndiff --git a/libio/fileops.c b/libio/fileops.c\nindex b8b02ba261..a9e948f31e 100644\n--- a/libio/fileops.c\n+++ b/libio/fileops.c\n@@ -26,9 +26,6 @@\n in files containing the exception. */\n \n \n-#ifndef _POSIX_SOURCE\n-# define _POSIX_SOURCE\n-#endif\n #include \"libioP.h\"\n #include <assert.h>\n #include <fcntl.h>\n@@ -40,48 +37,14 @@\n #include <errno.h>\n #include <unistd.h>\n #include <stdlib.h>\n-#if _LIBC\n-# include \"../wcsmbs/wcsmbsload.h\"\n-# include \"../iconv/gconv_charset.h\"\n-# include \"../iconv/gconv_int.h\"\n-# include <shlib-compat.h>\n-# include <not-cancel.h>\n-# include <kernel-features.h>\n-#endif\n-#ifndef errno\n-extern int errno;\n-#endif\n-#ifndef __set_errno\n-# define __set_errno(Val) errno = (Val)\n-#endif\n+#include \"../wcsmbs/wcsmbsload.h\"\n+#include \"../iconv/gconv_charset.h\"\n+#include \"../iconv/gconv_int.h\"\n+#include <shlib-compat.h>\n+#include <not-cancel.h>\n+#include <kernel-features.h>\n \n-\n-#ifdef _LIBC\n-# define open(Name, Flags, Prot) __open (Name, Flags, Prot)\n-# define lseek(FD, Offset, Whence) __lseek (FD, Offset, Whence)\n-# define read(FD, Buf, NBytes) __read (FD, Buf, NBytes)\n-# define write(FD, Buf, NBytes) __write (FD, Buf, NBytes)\n-#else\n-# define _IO_new_do_write _IO_do_write\n-# define _IO_new_file_attach _IO_file_attach\n-# define _IO_new_file_close_it _IO_file_close_it\n-# define _IO_new_file_finish _IO_file_finish\n-# define _IO_new_file_fopen _IO_file_fopen\n-# define _IO_new_file_init _IO_file_init\n-# define _IO_new_file_setbuf _IO_file_setbuf\n-# define _IO_new_file_sync _IO_file_sync\n-# define _IO_new_file_overflow _IO_file_overflow\n-# define _IO_new_file_seekoff _IO_file_seekoff\n-# define _IO_new_file_underflow _IO_file_underflow\n-# define _IO_new_file_write _IO_file_write\n-# define _IO_new_file_xsputn _IO_file_xsputn\n-#endif\n-\n-\n-#ifdef _LIBC\n extern struct __gconv_trans_data __libio_translit attribute_hidden;\n-#endif\n-\n \n /* An fstream can be in at most one of put mode, get mode, or putback mode.\n Putback mode is a variant of get mode.\n@@ -180,7 +143,6 @@ _IO_new_file_close_it (_IO_FILE *fp)\n \t\t ? _IO_SYSCLOSE (fp) : 0);\n \n /* Free buffer. */\n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n if (fp->_mode > 0)\n {\n if (_IO_have_wbackup (fp))\n@@ -189,7 +151,6 @@ _IO_new_file_close_it (_IO_FILE *fp)\n _IO_wsetg (fp, NULL, NULL, NULL);\n _IO_wsetp (fp, NULL, NULL);\n }\n-#endif\n _IO_setb (fp, NULL, NULL, 0);\n _IO_setg (fp, NULL, NULL, NULL);\n _IO_setp (fp, NULL, NULL);\n@@ -221,15 +182,11 @@ _IO_file_open (_IO_FILE *fp, const char *filename, int posix_mode, int prot,\n \t int read_write, int is32not64)\n {\n int fdesc;\n-#ifdef _LIBC\n if (__glibc_unlikely (fp->_flags2 & _IO_FLAGS2_NOTCANCEL))\n fdesc = __open_nocancel (filename,\n \t\t\t posix_mode | (is32not64 ? 0 : O_LARGEFILE), prot);\n else\n- fdesc = open (filename, posix_mode | (is32not64 ? 0 : O_LARGEFILE), prot);\n-#else\n- fdesc = open (filename, posix_mode, prot);\n-#endif\n+ fdesc = __open (filename, posix_mode | (is32not64 ? 0 : O_LARGEFILE), prot);\n if (fdesc < 0)\n return NULL;\n fp->_fileno = fdesc;\n@@ -260,10 +217,8 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,\n int oprot = 0666;\n int i;\n _IO_FILE *result;\n-#ifdef _LIBC\n const char *cs;\n const char *last_recognized;\n-#endif\n \n if (_IO_file_is_open (fp))\n return 0;\n@@ -287,9 +242,7 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,\n __set_errno (EINVAL);\n return NULL;\n }\n-#ifdef _LIBC\n last_recognized = mode;\n-#endif\n for (i = 1; i < 7; ++i)\n {\n switch (*++mode)\n@@ -299,20 +252,14 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,\n \tcase '+':\n \t omode = O_RDWR;\n \t read_write &= _IO_IS_APPENDING;\n-#ifdef _LIBC\n \t last_recognized = mode;\n-#endif\n \t continue;\n \tcase 'x':\n \t oflags |= O_EXCL;\n-#ifdef _LIBC\n \t last_recognized = mode;\n-#endif\n \t continue;\n \tcase 'b':\n-#ifdef _LIBC\n \t last_recognized = mode;\n-#endif\n \t continue;\n \tcase 'm':\n \t fp->_flags2 |= _IO_FLAGS2_MMAP;\n@@ -874,10 +821,8 @@ _IO_new_file_sync (_IO_FILE *fp)\n _IO_off64_t new_pos = _IO_SYSSEEK (fp, delta, 1);\n if (new_pos != (_IO_off64_t) EOF)\n \tfp->_IO_read_end = fp->_IO_read_ptr;\n-#ifdef ESPIPE\n else if (errno == ESPIPE)\n \t; /* Ignore error from unseekable devices. */\n-#endif\n else\n \tretval = EOF;\n }\n@@ -1205,7 +1150,7 @@ _IO_file_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)\n {\n return (__builtin_expect (fp->_flags2 & _IO_FLAGS2_NOTCANCEL, 0)\n \t ? __read_nocancel (fp->_fileno, buf, size)\n-\t : read (fp->_fileno, buf, size));\n+\t : __read (fp->_fileno, buf, size));\n }\n libc_hidden_def (_IO_file_read)\n \n@@ -1252,7 +1197,7 @@ _IO_new_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)\n _IO_ssize_t count = (__builtin_expect (f->_flags2\n \t\t\t\t\t & _IO_FLAGS2_NOTCANCEL, 0)\n \t\t\t ? __write_nocancel (f->_fileno, data, to_do)\n-\t\t\t : write (f->_fileno, data, to_do));\n+\t\t\t : __write (f->_fileno, data, to_do));\n if (count < 0)\n \t{\n \t f->_flags |= _IO_ERR_SEEN;\n@@ -1307,12 +1252,7 @@ _IO_new_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)\n {\n if (count > to_do)\n \tcount = to_do;\n-#ifdef _LIBC\n f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);\n-#else\n- memcpy (f->_IO_write_ptr, s, count);\n- f->_IO_write_ptr += count;\n-#endif\n s += count;\n to_do -= count;\n }\n@@ -1380,12 +1320,7 @@ _IO_file_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)\n \t{\n \t if (have > 0)\n \t {\n-#ifdef _LIBC\n \t s = __mempcpy (s, fp->_IO_read_ptr, have);\n-#else\n-\t memcpy (s, fp->_IO_read_ptr, have);\n-\t s += have;\n-#endif\n \t want -= have;\n \t fp->_IO_read_ptr += have;\n \t }\n@@ -1458,12 +1393,7 @@ _IO_file_xsgetn_mmap (_IO_FILE *fp, void *data, _IO_size_t n)\n {\n if (__glibc_unlikely (_IO_in_backup (fp)))\n \t{\n-#ifdef _LIBC\n \t s = __mempcpy (s, read_ptr, have);\n-#else\n-\t memcpy (s, read_ptr, have);\n-\t s += have;\n-#endif\n \t n -= have;\n \t _IO_switch_to_main_get_area (fp);\n \t read_ptr = fp->_IO_read_ptr;\n@@ -1488,12 +1418,7 @@ _IO_file_xsgetn_mmap (_IO_FILE *fp, void *data, _IO_size_t n)\n if (have != 0)\n {\n have = MIN (have, n);\n-#ifdef _LIBC\n s = __mempcpy (s, read_ptr, have);\n-#else\n- memcpy (s, read_ptr, have);\n- s += have;\n-#endif\n fp->_IO_read_ptr = read_ptr + have;\n }\n \n@@ -1510,7 +1435,6 @@ _IO_file_xsgetn_maybe_mmap (_IO_FILE *fp, void *data, _IO_size_t n)\n return _IO_XSGETN (fp, data, n);\n }\n \n-#ifdef _LIBC\n versioned_symbol (libc, _IO_new_do_write, _IO_do_write, GLIBC_2_1);\n versioned_symbol (libc, _IO_new_file_attach, _IO_file_attach, GLIBC_2_1);\n versioned_symbol (libc, _IO_new_file_close_it, _IO_file_close_it, GLIBC_2_1);\n@@ -1524,7 +1448,6 @@ versioned_symbol (libc, _IO_new_file_seekoff, _IO_file_seekoff, GLIBC_2_1);\n versioned_symbol (libc, _IO_new_file_underflow, _IO_file_underflow, GLIBC_2_1);\n versioned_symbol (libc, _IO_new_file_write, _IO_file_write, GLIBC_2_1);\n versioned_symbol (libc, _IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2_1);\n-#endif\n \n const struct _IO_jump_t _IO_file_jumps libio_vtable =\n {\ndiff --git a/libio/ftello.c b/libio/ftello.c\nindex 38863e16c3..9791e835c6 100644\n--- a/libio/ftello.c\n+++ b/libio/ftello.c\n@@ -45,17 +45,13 @@ __ftello (_IO_FILE *fp)\n _IO_release_lock (fp);\n if (pos == _IO_pos_BAD)\n {\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n return -1L;\n }\n if ((_IO_off64_t) (off_t) pos != pos)\n {\n-#ifdef EOVERFLOW\n __set_errno (EOVERFLOW);\n-#endif\n return -1L;\n }\n return pos;\ndiff --git a/libio/ftello64.c b/libio/ftello64.c\nindex edb10e0880..15518af7a6 100644\n--- a/libio/ftello64.c\n+++ b/libio/ftello64.c\n@@ -46,10 +46,8 @@ ftello64 (_IO_FILE *fp)\n _IO_release_lock (fp);\n if (pos == _IO_pos_BAD)\n {\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n return -1L;\n }\n return pos;\ndiff --git a/libio/genops.c b/libio/genops.c\nindex 6ad7346cae..e3f372520a 100644\n--- a/libio/genops.c\n+++ b/libio/genops.c\n@@ -30,9 +30,7 @@\n #include <stdlib.h>\n #include <string.h>\n #include <stdbool.h>\n-#ifdef _LIBC\n #include <sched.h>\n-#endif\n \n #ifdef _IO_MTSAFE_IO\n static _IO_lock_t list_all_lock = _IO_lock_initializer;\n@@ -233,16 +231,7 @@ __overflow (_IO_FILE *f, int ch)\n }\n libc_hidden_def (__overflow)\n \n-static int save_for_backup (_IO_FILE *fp, char *end_p)\n-#ifdef _LIBC\n- internal_function\n-#endif\n- ;\n-\n static int\n-#ifdef _LIBC\n-internal_function\n-#endif\n save_for_backup (_IO_FILE *fp, char *end_p)\n {\n /* Append [_IO_read_base..end_p] to backup area. */\n@@ -263,20 +252,11 @@ save_for_backup (_IO_FILE *fp, char *end_p)\n \treturn EOF;\t\t/* FIXME */\n if (least_mark < 0)\n \t{\n-#ifdef _LIBC\n \t __mempcpy (__mempcpy (new_buffer + avail,\n \t\t\t\tfp->_IO_save_end + least_mark,\n \t\t\t\t-least_mark),\n \t\t fp->_IO_read_base,\n \t\t end_p - fp->_IO_read_base);\n-#else\n-\t memcpy (new_buffer + avail,\n-\t\t fp->_IO_save_end + least_mark,\n-\t\t -least_mark);\n-\t memcpy (new_buffer + avail - least_mark,\n-\t\t fp->_IO_read_base,\n-\t\t end_p - fp->_IO_read_base);\n-#endif\n \t}\n else\n \tmemcpy (new_buffer + avail,\n@@ -314,10 +294,8 @@ save_for_backup (_IO_FILE *fp, char *end_p)\n int\n __underflow (_IO_FILE *fp)\n {\n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n if (_IO_vtable_offset (fp) == 0 && _IO_fwide (fp, -1) != -1)\n return EOF;\n-#endif\n \n if (fp->_mode == 0)\n _IO_fwide (fp, -1);\n@@ -346,10 +324,8 @@ libc_hidden_def (__underflow)\n int\n __uflow (_IO_FILE *fp)\n {\n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n if (_IO_vtable_offset (fp) == 0 && _IO_fwide (fp, -1) != -1)\n return EOF;\n-#endif\n \n if (fp->_mode == 0)\n _IO_fwide (fp, -1);\n@@ -434,12 +410,7 @@ _IO_default_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)\n \t count = more;\n \t if (count > 20)\n \t {\n-#ifdef _LIBC\n \t f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);\n-#else\n-\t memcpy (f->_IO_write_ptr, s, count);\n-\t f->_IO_write_ptr += count;\n-#endif\n \t s += count;\n \t }\n \t else if (count)\n@@ -483,12 +454,7 @@ _IO_default_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)\n \t count = more;\n \t if (count > 20)\n \t {\n-#ifdef _LIBC\n \t s = __mempcpy (s, fp->_IO_read_ptr, count);\n-#else\n-\t memcpy (s, fp->_IO_read_ptr, count);\n-\t s += count;\n-#endif\n \t fp->_IO_read_ptr += count;\n \t }\n \t else if (count)\n@@ -633,7 +599,6 @@ _IO_no_init (_IO_FILE *fp, int flags, int orientation,\n {\n _IO_old_init (fp, flags);\n fp->_mode = orientation;\n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n if (orientation >= 0)\n {\n fp->_wide_data = wd;\n@@ -655,7 +620,6 @@ _IO_no_init (_IO_FILE *fp, int flags, int orientation,\n /* Cause predictable crash when a wide function is called on a byte\n stream. */\n fp->_wide_data = (struct _IO_wide_data *) -1L;\n-#endif\n fp->_freeres_list = NULL;\n }\n \n@@ -811,11 +775,9 @@ _IO_flush_all_lockp (int do_lock)\n \t_IO_flockfile (fp);\n \n if (((fp->_mode <= 0 && fp->_IO_write_ptr > fp->_IO_write_base)\n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n \t || (_IO_vtable_offset (fp) == 0\n \t && fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr\n \t\t\t\t > fp->_wide_data->_IO_write_base))\n-#endif\n \t )\n \t && _IO_OVERFLOW (fp, EOF) == EOF)\n \tresult = EOF;\n@@ -892,9 +854,7 @@ _IO_flush_all_linebuffered (void)\n #endif\n }\n libc_hidden_def (_IO_flush_all_linebuffered)\n-#ifdef _LIBC\n weak_alias (_IO_flush_all_linebuffered, _flushlbf)\n-#endif\n \n \n /* The following is a bit tricky. In general, we want to unbuffer the\ndiff --git a/libio/getc.c b/libio/getc.c\nindex fd66ef93cf..2df0fcc983 100644\n--- a/libio/getc.c\n+++ b/libio/getc.c\n@@ -44,7 +44,6 @@ _IO_getc (FILE *fp)\n \n #undef getc\n \n-#ifdef weak_alias\n weak_alias (_IO_getc, getc)\n weak_alias (_IO_getc, fgetc)\n \n@@ -53,4 +52,3 @@ weak_alias (_IO_getc, fgetc)\n weak_alias (_IO_getc, getc_unlocked)\n weak_alias (_IO_getc, fgetc_unlocked)\n #endif\n-#endif\ndiff --git a/libio/getwc.c b/libio/getwc.c\nindex 9959aab2f0..fbc2bb1ab7 100644\n--- a/libio/getwc.c\n+++ b/libio/getwc.c\n@@ -43,7 +43,5 @@ _IO_getwc (FILE *fp)\n \n #undef getwc\n \n-#ifdef weak_alias\n weak_alias (_IO_getwc, getwc)\n weak_alias (_IO_getwc, fgetwc)\n-#endif\ndiff --git a/libio/iofclose.c b/libio/iofclose.c\nindex 9c51c4efd2..f5dc3db2a3 100644\n--- a/libio/iofclose.c\n+++ b/libio/iofclose.c\n@@ -26,13 +26,8 @@\n \n #include \"libioP.h\"\n #include <stdlib.h>\n-#if _LIBC\n-# include \"../iconv/gconv_int.h\"\n-# include <shlib-compat.h>\n-#else\n-# define SHLIB_COMPAT(a, b, c) 0\n-# define _IO_new_fclose fclose\n-#endif\n+#include \"../iconv/gconv_int.h\"\n+#include <shlib-compat.h>\n \n int\n _IO_new_fclose (_IO_FILE *fp)\n@@ -62,7 +57,6 @@ _IO_new_fclose (_IO_FILE *fp)\n _IO_FINISH (fp);\n if (fp->_mode > 0)\n {\n-#if _LIBC\n /* This stream has a wide orientation. This means we have to free\n \t the conversion functions. */\n struct _IO_codecvt *cc = fp->_codecvt;\n@@ -71,7 +65,6 @@ _IO_new_fclose (_IO_FILE *fp)\n __gconv_release_step (cc->__cd_in.__cd.__steps);\n __gconv_release_step (cc->__cd_out.__cd.__steps);\n __libc_lock_unlock (__gconv_lock);\n-#endif\n }\n else\n {\n@@ -87,8 +80,6 @@ _IO_new_fclose (_IO_FILE *fp)\n return status;\n }\n \n-#ifdef _LIBC\n versioned_symbol (libc, _IO_new_fclose, _IO_fclose, GLIBC_2_1);\n strong_alias (_IO_new_fclose, __new_fclose)\n versioned_symbol (libc, __new_fclose, fclose, GLIBC_2_1);\n-#endif\ndiff --git a/libio/iofdopen.c b/libio/iofdopen.c\nindex 2a1df4680a..90346a4ece 100644\n--- a/libio/iofdopen.c\n+++ b/libio/iofdopen.c\n@@ -28,17 +28,7 @@\n #include \"libioP.h\"\n #include <fcntl.h>\n \n-#ifdef _LIBC\n-# include <shlib-compat.h>\n-#endif\n-\n-#ifndef _IO_fcntl\n-#ifdef _LIBC\n-#define _IO_fcntl __fcntl\n-#else\n-#define _IO_fcntl fcntl\n-#endif\n-#endif\n+#include <shlib-compat.h>\n \n _IO_FILE *\n _IO_new_fdopen (int fd, const char *mode)\n@@ -95,11 +85,7 @@ _IO_new_fdopen (int fd, const char *mode)\n \t}\n break;\n }\n-#ifdef F_GETFL\n- int fd_flags = _IO_fcntl (fd, F_GETFL);\n-#ifndef O_ACCMODE\n-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)\n-#endif\n+ int fd_flags = __fcntl (fd, F_GETFL);\n if (fd_flags == -1)\n return NULL;\n \n@@ -129,12 +115,9 @@ _IO_new_fdopen (int fd, const char *mode)\n if ((read_write & _IO_IS_APPENDING) && !(fd_flags & O_APPEND))\n {\n do_seek = true;\n-#ifdef F_SETFL\n- if (_IO_fcntl (fd, F_SETFL, fd_flags | O_APPEND) == -1)\n-#endif\n+ if (__fcntl (fd, F_SETFL, fd_flags | O_APPEND) == -1)\n \treturn NULL;\n }\n-#endif\n \n new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));\n if (new_f == NULL)\ndiff --git a/libio/iofflush.c b/libio/iofflush.c\nindex c6b1f15946..b312fd23ab 100644\n--- a/libio/iofflush.c\n+++ b/libio/iofflush.c\n@@ -44,7 +44,6 @@ _IO_fflush (_IO_FILE *fp)\n }\n libc_hidden_def (_IO_fflush)\n \n-#ifdef weak_alias\n weak_alias (_IO_fflush, fflush)\n libc_hidden_weak (fflush)\n \n@@ -54,4 +53,3 @@ libc_hidden_def (__fflush_unlocked)\n weak_alias (_IO_fflush, fflush_unlocked)\n libc_hidden_weak (fflush_unlocked)\n #endif\n-#endif\ndiff --git a/libio/iofgetpos.c b/libio/iofgetpos.c\nindex c1330dee29..f3034528f1 100644\n--- a/libio/iofgetpos.c\n+++ b/libio/iofgetpos.c\n@@ -56,17 +56,13 @@ _IO_new_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n result = EOF;\n }\n else if ((_IO_off64_t) (__typeof (posp->__pos)) pos != pos)\n {\n-#ifdef EOVERFLOW\n __set_errno (EOVERFLOW);\n-#endif\n result = EOF;\n }\n else\ndiff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c\nindex 340dded802..e9c464d108 100644\n--- a/libio/iofgetpos64.c\n+++ b/libio/iofgetpos64.c\n@@ -47,10 +47,8 @@ _IO_new_fgetpos64 (_IO_FILE *fp, _IO_fpos64_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-# ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-# endif\n result = EOF;\n }\n else\ndiff --git a/libio/iofgets.c b/libio/iofgets.c\nindex 8643e7c6cc..232d28ef81 100644\n--- a/libio/iofgets.c\n+++ b/libio/iofgets.c\n@@ -66,7 +66,6 @@ _IO_fgets (char *buf, int n, _IO_FILE *fp)\n return result;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_fgets, fgets)\n \n # ifndef _IO_MTSAFE_IO\n@@ -75,4 +74,3 @@ libc_hidden_def (__fgets_unlocked)\n weak_alias (_IO_fgets, fgets_unlocked)\n libc_hidden_weak (fgets_unlocked)\n # endif\n-#endif\ndiff --git a/libio/iofopen.c b/libio/iofopen.c\nindex 3d30dfd94a..62d0332994 100644\n--- a/libio/iofopen.c\n+++ b/libio/iofopen.c\n@@ -28,11 +28,7 @@\n #include <fcntl.h>\n #include <stdlib.h>\n #include <stddef.h>\n-#ifdef _LIBC\n-# include <shlib-compat.h>\n-#else\n-# define _IO_new_fopen fopen\n-#endif\n+#include <shlib-compat.h>\n \n _IO_FILE *\n __fopen_maybe_mmap (_IO_FILE *fp)\n@@ -73,11 +69,7 @@ __fopen_internal (const char *filename, const char *mode, int is32)\n #ifdef _IO_MTSAFE_IO\n new_f->fp.file._lock = &new_f->lock;\n #endif\n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n _IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);\n-#else\n- _IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL);\n-#endif\n _IO_JUMPS (&new_f->fp) = &_IO_file_jumps;\n _IO_new_file_init_internal (&new_f->fp);\n #if !_IO_UNIFIED_JUMPTABLES\n@@ -97,7 +89,6 @@ _IO_new_fopen (const char *filename, const char *mode)\n return __fopen_internal (filename, mode, 1);\n }\n \n-#ifdef _LIBC\n strong_alias (_IO_new_fopen, __new_fopen)\n versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1);\n versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);\n@@ -106,4 +97,3 @@ versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);\n weak_alias (_IO_new_fopen, _IO_fopen64)\n weak_alias (_IO_new_fopen, fopen64)\n # endif\n-#endif\ndiff --git a/libio/iofopen64.c b/libio/iofopen64.c\nindex 1ec2375990..9230fc173f 100644\n--- a/libio/iofopen64.c\n+++ b/libio/iofopen64.c\n@@ -29,7 +29,7 @@\n #include <stdlib.h>\n \n /* iofopen.c defines _IO_fopen64/fopen64 as aliases if O_LARGEFILE==0. */\n-#if !defined _LIBC || (defined O_LARGEFILE && O_LARGEFILE != 0)\n+#if defined O_LARGEFILE && O_LARGEFILE != 0\n \n _IO_FILE *\n _IO_fopen64 (const char *filename, const char *mode)\n@@ -37,8 +37,6 @@ _IO_fopen64 (const char *filename, const char *mode)\n return __fopen_internal (filename, mode, 0);\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_fopen64, fopen64)\n-#endif\n \n #endif\ndiff --git a/libio/iofputs.c b/libio/iofputs.c\nindex 379f9b0695..c40efc0644 100644\n--- a/libio/iofputs.c\n+++ b/libio/iofputs.c\n@@ -42,7 +42,6 @@ _IO_fputs (const char *str, _IO_FILE *fp)\n }\n libc_hidden_def (_IO_fputs)\n \n-#ifdef weak_alias\n weak_alias (_IO_fputs, fputs)\n \n # ifndef _IO_MTSAFE_IO\n@@ -51,4 +50,3 @@ libc_hidden_def (__fputs_unlocked)\n weak_alias (_IO_fputs, fputs_unlocked)\n libc_hidden_ver (_IO_fputs, fputs_unlocked)\n # endif\n-#endif\ndiff --git a/libio/iofread.c b/libio/iofread.c\nindex c6922d3dbf..8bb948ef4a 100644\n--- a/libio/iofread.c\n+++ b/libio/iofread.c\n@@ -41,7 +41,6 @@ _IO_fread (void *buf, _IO_size_t size, _IO_size_t count, _IO_FILE *fp)\n }\n libc_hidden_def (_IO_fread)\n \n-#ifdef weak_alias\n weak_alias (_IO_fread, fread)\n \n # ifndef _IO_MTSAFE_IO\n@@ -49,4 +48,3 @@ strong_alias (_IO_fread, __fread_unlocked)\n libc_hidden_def (__fread_unlocked)\n weak_alias (_IO_fread, fread_unlocked)\n # endif\n-#endif\ndiff --git a/libio/iofsetpos.c b/libio/iofsetpos.c\nindex 3809b6a0b0..1a71867e59 100644\n--- a/libio/iofsetpos.c\n+++ b/libio/iofsetpos.c\n@@ -49,10 +49,8 @@ _IO_new_fsetpos (_IO_FILE *fp, const _IO_fpos_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n result = EOF;\n }\n else\ndiff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c\nindex 04b4ddf29f..d3166ea20b 100644\n--- a/libio/iofsetpos64.c\n+++ b/libio/iofsetpos64.c\n@@ -41,10 +41,8 @@ _IO_new_fsetpos64 (_IO_FILE *fp, const _IO_fpos64_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n result = EOF;\n }\n else\ndiff --git a/libio/ioftell.c b/libio/ioftell.c\nindex 21ba5fc6e3..09d2a1147d 100644\n--- a/libio/ioftell.c\n+++ b/libio/ioftell.c\n@@ -44,23 +44,17 @@ _IO_ftell (_IO_FILE *fp)\n _IO_release_lock (fp);\n if (pos == _IO_pos_BAD)\n {\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n return -1L;\n }\n if ((_IO_off64_t) (long int) pos != pos)\n {\n-#ifdef EOVERFLOW\n __set_errno (EOVERFLOW);\n-#endif\n return -1L;\n }\n return pos;\n }\n libc_hidden_def (_IO_ftell)\n \n-#ifdef weak_alias\n weak_alias (_IO_ftell, ftell)\n-#endif\ndiff --git a/libio/iofwide.c b/libio/iofwide.c\nindex 76efb32f5d..9b718c0ccd 100644\n--- a/libio/iofwide.c\n+++ b/libio/iofwide.c\n@@ -25,22 +25,18 @@\n in files containing the exception. */\n \n #include <libioP.h>\n-#ifdef _LIBC\n-# include <dlfcn.h>\n-# include <wchar.h>\n-#endif\n+#include <dlfcn.h>\n+#include <wchar.h>\n #include <assert.h>\n #include <stdlib.h>\n #include <string.h>\n \n-#ifdef _LIBC\n-# include <langinfo.h>\n-# include <locale/localeinfo.h>\n-# include <wcsmbs/wcsmbsload.h>\n-# include <iconv/gconv_int.h>\n-# include <shlib-compat.h>\n-# include <sysdep.h>\n-#endif\n+#include <langinfo.h>\n+#include <locale/localeinfo.h>\n+#include <wcsmbs/wcsmbsload.h>\n+#include <iconv/gconv_int.h>\n+#include <shlib-compat.h>\n+#include <sysdep.h>\n \n \n /* Prototypes of libio's codecvt functions. */\n@@ -90,8 +86,7 @@ _IO_fwide (_IO_FILE *fp, int mode)\n /* Normalize the value. */\n mode = mode < 0 ? -1 : (mode == 0 ? 0 : 1);\n \n-#if defined SHARED && defined _LIBC \\\n- && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)\n+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)\n if (__builtin_expect (&_IO_stdin_used == NULL, 0)\n && (fp == _IO_stdin || fp == _IO_stdout || fp == _IO_stderr))\n /* This is for a stream in the glibc 2.0 format. */\n@@ -114,7 +109,6 @@ _IO_fwide (_IO_FILE *fp, int mode)\n \n /* Get the character conversion functions based on the currently\n \t selected locale for LC_CTYPE. */\n-#ifdef _LIBC\n {\n \t/* Clear the state. We start all over again. */\n \tmemset (&fp->_wide_data->_IO_state, '\\0', sizeof (__mbstate_t));\n@@ -145,41 +139,6 @@ _IO_fwide (_IO_FILE *fp, int mode)\n \t = __GCONV_IS_LAST | __GCONV_TRANSLIT;\n \tcc->__cd_out.__cd.__data[0].__statep = &fp->_wide_data->_IO_state;\n }\n-#else\n-# ifdef _GLIBCPP_USE_WCHAR_T\n- {\n-\t/* Determine internal and external character sets.\n-\n-\t XXX For now we make our life easy: we assume a fixed internal\n-\t encoding (as most sane systems have; hi HP/UX!). If somebody\n-\t cares about systems which changing internal charsets they\n-\t should come up with a solution for the determination of the\n-\t currently used internal character set. */\n-\tconst char *internal_ccs = _G_INTERNAL_CCS;\n-\tconst char *external_ccs = NULL;\n-\n-# ifdef HAVE_NL_LANGINFO\n-\texternal_ccs = nl_langinfo (CODESET);\n-# endif\n-\tif (external_ccs == NULL)\n-\t external_ccs = \"ISO-8859-1\";\n-\n-\tcc->__cd_in = iconv_open (internal_ccs, external_ccs);\n-\tif (cc->__cd_in != (iconv_t) -1)\n-\t cc->__cd_out = iconv_open (external_ccs, internal_ccs);\n-\n-\tif (cc->__cd_in == (iconv_t) -1 || cc->__cd_out == (iconv_t) -1)\n-\t {\n-\t if (cc->__cd_in != (iconv_t) -1)\n-\t iconv_close (cc->__cd_in);\n-\t /* XXX */\n-\t abort ();\n-\t }\n- }\n-# else\n-# error \"somehow determine this from LC_CTYPE\"\n-# endif\n-#endif\n \n /* From now on use the wide character callback functions. */\n _IO_JUMPS_FILE_plus (fp) = fp->_wide_data->_wide_vtable;\n@@ -200,7 +159,6 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n {\n enum __codecvt_result result;\n \n-#ifdef _LIBC\n struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps;\n int status;\n size_t dummy;\n@@ -240,28 +198,6 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n result = __codecvt_error;\n break;\n }\n-#else\n-# ifdef _GLIBCPP_USE_WCHAR_T\n- size_t res;\n- const char *from_start_copy = (const char *) from_start;\n- size_t from_len = from_end - from_start;\n- char *to_start_copy = to_start;\n- size_t to_len = to_end - to_start;\n- res = iconv (codecvt->__cd_out, &from_start_copy, &from_len,\n-\t &to_start_copy, &to_len);\n-\n- if (res == 0 || from_len == 0)\n- result = __codecvt_ok;\n- else if (to_len < codecvt->__codecvt_do_max_length (codecvt))\n- result = __codecvt_partial;\n- else\n- result = __codecvt_error;\n-\n-# else\n- /* Decide what to do. */\n- result = __codecvt_error;\n-# endif\n-#endif\n \n return result;\n }\n@@ -273,7 +209,6 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n {\n enum __codecvt_result result;\n \n-#ifdef _LIBC\n struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps;\n int status;\n size_t dummy;\n@@ -310,25 +245,6 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n result = __codecvt_error;\n break;\n }\n-#else\n-# ifdef _GLIBCPP_USE_WCHAR_T\n- size_t res;\n- char *to_start_copy = (char *) to_start;\n- size_t to_len = to_end - to_start;\n-\n- res = iconv (codecvt->__cd_out, NULL, NULL, &to_start_copy, &to_len);\n-\n- if (res == 0)\n- result = __codecvt_ok;\n- else if (to_len < codecvt->__codecvt_do_max_length (codecvt))\n- result = __codecvt_partial;\n- else\n- result = __codecvt_error;\n-# else\n- /* Decide what to do. */\n- result = __codecvt_error;\n-# endif\n-#endif\n \n return result;\n }\n@@ -341,7 +257,6 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n {\n enum __codecvt_result result;\n \n-#ifdef _LIBC\n struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps;\n int status;\n size_t dummy;\n@@ -381,30 +296,6 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n result = __codecvt_error;\n break;\n }\n-#else\n-# ifdef _GLIBCPP_USE_WCHAR_T\n- size_t res;\n- const char *from_start_copy = (const char *) from_start;\n- size_t from_len = from_end - from_start;\n- char *to_start_copy = (char *) from_start;\n- size_t to_len = to_end - to_start;\n-\n- res = iconv (codecvt->__cd_in, &from_start_copy, &from_len,\n-\t &to_start_copy, &to_len);\n-\n- if (res == 0)\n- result = __codecvt_ok;\n- else if (to_len == 0)\n- result = __codecvt_partial;\n- else if (from_len < codecvt->__codecvt_do_max_length (codecvt))\n- result = __codecvt_partial;\n- else\n- result = __codecvt_error;\n-# else\n- /* Decide what to do. */\n- result = __codecvt_error;\n-# endif\n-#endif\n \n return result;\n }\n@@ -413,7 +304,6 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n static int\n do_encoding (struct _IO_codecvt *codecvt)\n {\n-#ifdef _LIBC\n /* See whether the encoding is stateful. */\n if (codecvt->__cd_in.__cd.__steps[0].__stateful)\n return -1;\n@@ -425,10 +315,6 @@ do_encoding (struct _IO_codecvt *codecvt)\n return 0;\n \n return codecvt->__cd_in.__cd.__steps[0].__min_needed_from;\n-#else\n- /* Worst case scenario. */\n- return -1;\n-#endif\n }\n \n \n@@ -444,7 +330,6 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n \t const char *from_start, const char *from_end, _IO_size_t max)\n {\n int result;\n-#ifdef _LIBC\n const unsigned char *cp = (const unsigned char *) from_start;\n wchar_t to_buf[max];\n struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps;\n@@ -466,23 +351,6 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n \t\t&dummy, 0, 0));\n \n result = cp - (const unsigned char *) from_start;\n-#else\n-# ifdef _GLIBCPP_USE_WCHAR_T\n- const char *from_start_copy = (const char *) from_start;\n- size_t from_len = from_end - from_start;\n- wchar_t to_buf[max];\n- size_t res;\n- char *to_start = (char *) to_buf;\n-\n- res = iconv (codecvt->__cd_in, &from_start_copy, &from_len,\n-\t &to_start, &max);\n-\n- result = from_start_copy - (char *) from_start;\n-# else\n- /* Decide what to do. */\n- result = 0;\n-# endif\n-#endif\n \n return result;\n }\n@@ -491,9 +359,5 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,\n static int\n do_max_length (struct _IO_codecvt *codecvt)\n {\n-#ifdef _LIBC\n return codecvt->__cd_in.__cd.__steps[0].__max_needed_from;\n-#else\n- return MB_CUR_MAX;\n-#endif\n }\ndiff --git a/libio/iofwrite.c b/libio/iofwrite.c\nindex c89dd9091f..72f703af62 100644\n--- a/libio/iofwrite.c\n+++ b/libio/iofwrite.c\n@@ -49,7 +49,6 @@ _IO_fwrite (const void *buf, _IO_size_t size, _IO_size_t count, _IO_FILE *fp)\n }\n libc_hidden_def (_IO_fwrite)\n \n-#ifdef weak_alias\n # include <stdio.h>\n weak_alias (_IO_fwrite, fwrite)\n libc_hidden_weak (fwrite)\n@@ -57,4 +56,3 @@ libc_hidden_weak (fwrite)\n weak_alias (_IO_fwrite, fwrite_unlocked)\n libc_hidden_weak (fwrite_unlocked)\n # endif\n-#endif\ndiff --git a/libio/iogetdelim.c b/libio/iogetdelim.c\nindex 59138881b8..0fce4af768 100644\n--- a/libio/iogetdelim.c\n+++ b/libio/iogetdelim.c\n@@ -123,7 +123,5 @@ unlock_return:\n return result;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_getdelim, __getdelim)\n weak_alias (_IO_getdelim, getdelim)\n-#endif\ndiff --git a/libio/iogets.c b/libio/iogets.c\nindex 432cecb75c..166a88a4a9 100644\n--- a/libio/iogets.c\n+++ b/libio/iogets.c\n@@ -67,10 +67,6 @@ unlock_return:\n return retval;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_gets, gets)\n-#endif\n \n-#ifdef _LIBC\n link_warning (gets, \"the `gets' function is dangerous and should not be used.\")\n-#endif\ndiff --git a/libio/iogetwline.c b/libio/iogetwline.c\nindex e60a590cc4..535f90339e 100644\n--- a/libio/iogetwline.c\n+++ b/libio/iogetwline.c\n@@ -28,10 +28,6 @@\n #include <string.h>\n #include <wchar.h>\n \n-#ifdef _LIBC\n-# define wmemcpy __wmemcpy\n-#endif\n-\n _IO_size_t\n _IO_getwline (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,\n \t int extract_delim)\n@@ -98,12 +94,12 @@ _IO_getwline_info (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,\n \t\t if (extract_delim > 0)\n \t\t ++len;\n \t\t}\n-\t wmemcpy ((void *) ptr, (void *) fp->_wide_data->_IO_read_ptr,\n-\t\t len);\n+\t __wmemcpy ((void *) ptr, (void *) fp->_wide_data->_IO_read_ptr,\n+\t\t\t len);\n \t fp->_wide_data->_IO_read_ptr = t;\n \t return old_len + len;\n \t }\n-\t wmemcpy ((void *) ptr, (void *) fp->_wide_data->_IO_read_ptr, len);\n+\t __wmemcpy ((void *) ptr, (void *) fp->_wide_data->_IO_read_ptr, len);\n \t fp->_wide_data->_IO_read_ptr += len;\n \t ptr += len;\n \t n -= len;\ndiff --git a/libio/iopopen.c b/libio/iopopen.c\nindex a2ddebb32b..466260ea55 100644\n--- a/libio/iopopen.c\n+++ b/libio/iopopen.c\n@@ -25,63 +25,17 @@\n This exception applies to code released by its copyright holders\n in files containing the exception. */\n \n-#ifndef _POSIX_SOURCE\n-# define _POSIX_SOURCE\n-#endif\n #include \"libioP.h\"\n #include <fcntl.h>\n #include <signal.h>\n #include <unistd.h>\n #include <stdlib.h>\n-#ifdef _LIBC\n-# include <shlib-compat.h>\n-# include <not-cancel.h>\n-#endif\n+#include <shlib-compat.h>\n+#include <not-cancel.h>\n #include <sys/types.h>\n #include <sys/wait.h>\n #include <kernel-features.h>\n \n-#ifndef _IO_fork\n-#ifdef _LIBC\n-#define _IO_fork __fork\n-#else\n-#define _IO_fork fork /* defined in libiberty, if needed */\n-#endif\n-extern _IO_pid_t _IO_fork (void) __THROW;\n-#endif\n-\n-#ifndef _IO_dup2\n-#ifdef _LIBC\n-#define _IO_dup2 __dup2\n-#else\n-#define _IO_dup2 dup2\n-#endif\n-extern int _IO_dup2 (int fd, int fd2) __THROW;\n-#endif\n-\n-#ifndef _IO_waitpid\n-#ifdef _LIBC\n-#define _IO_waitpid __waitpid_nocancel\n-#else\n-#define _IO_waitpid waitpid\n-#endif\n-#endif\n-\n-#ifndef _IO_execl\n-#define _IO_execl execl\n-#endif\n-#ifndef _IO__exit\n-#define _IO__exit _exit\n-#endif\n-\n-#ifndef _IO_close\n-#ifdef _LIBC\n-#define _IO_close __close_nocancel\n-#else\n-#define _IO_close close\n-#endif\n-#endif\n-\n struct _IO_proc_file\n {\n struct _IO_FILE_plus file;\n@@ -165,14 +119,14 @@ _IO_new_proc_open (_IO_FILE *fp, const char *command, const char *mode)\n read_or_write = _IO_NO_READS;\n }\n \n- ((_IO_proc_file *) fp)->pid = child_pid = _IO_fork ();\n+ ((_IO_proc_file *) fp)->pid = child_pid = __fork ();\n if (child_pid == 0)\n {\n int child_std_end = do_read ? 1 : 0;\n struct _IO_proc_file *p;\n \n if (child_end != child_std_end)\n-\t_IO_dup2 (child_end, child_std_end);\n+\t__dup2 (child_end, child_std_end);\n else\n \t/* The descriptor is already the one we will use. But it must\n \t not be marked close-on-exec. Undo the effects. */\n@@ -188,16 +142,16 @@ _IO_new_proc_open (_IO_FILE *fp, const char *command, const char *mode)\n \t child_std_end, it has been already closed by the dup2 syscall\n \t above. */\n \t if (fd != child_std_end)\n-\t _IO_close (fd);\n+\t __close_nocancel (fd);\n \t}\n \n- _IO_execl (\"/bin/sh\", \"sh\", \"-c\", command, (char *) 0);\n- _IO__exit (127);\n+ execl (\"/bin/sh\", \"sh\", \"-c\", command, (char *) 0);\n+ _exit (127);\n }\n- _IO_close (child_end);\n+ __close_nocancel (child_end);\n if (child_pid < 0)\n {\n- _IO_close (parent_end);\n+ __close_nocancel (parent_end);\n return NULL;\n }\n \n@@ -284,7 +238,7 @@ _IO_new_proc_close (_IO_FILE *fp)\n _IO_cleanup_region_end (0);\n #endif\n \n- if (status < 0 || _IO_close (_IO_fileno(fp)) < 0)\n+ if (status < 0 || __close_nocancel (_IO_fileno(fp)) < 0)\n return -1;\n /* POSIX.2 Rationale: \"Some historical implementations either block\n or ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting\n@@ -292,7 +246,7 @@ _IO_new_proc_close (_IO_FILE *fp)\n described in POSIX.2, such implementations are not conforming.\" */\n do\n {\n- wait_pid = _IO_waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);\n+ wait_pid = __waitpid_nocancel (((_IO_proc_file *) fp)->pid, &wstatus, 0);\n }\n while (wait_pid == -1 && errno == EINTR);\n if (wait_pid == -1)\ndiff --git a/libio/ioputs.c b/libio/ioputs.c\nindex bf3224e9ab..2529c7bbd1 100644\n--- a/libio/ioputs.c\n+++ b/libio/ioputs.c\n@@ -45,6 +45,4 @@ _IO_puts (const char *str)\n return result;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_puts, puts)\n-#endif\ndiff --git a/libio/ioseekoff.c b/libio/ioseekoff.c\nindex 425c020c51..e06b066a6f 100644\n--- a/libio/ioseekoff.c\n+++ b/libio/ioseekoff.c\n@@ -27,12 +27,6 @@\n #include <stdlib.h>\n #include <libioP.h>\n #include <errno.h>\n-#ifndef errno\n-extern int errno;\n-#endif\n-#ifndef __set_errno\n-# define __set_errno(Val) errno = (Val)\n-#endif\n \n _IO_off64_t\n _IO_seekoff_unlocked (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)\ndiff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c\nindex c5df900fd9..25a6032979 100644\n--- a/libio/iosetbuffer.c\n+++ b/libio/iosetbuffer.c\n@@ -42,6 +42,4 @@ _IO_setbuffer (_IO_FILE *fp, char *buf, _IO_size_t size)\n }\n libc_hidden_def (_IO_setbuffer)\n \n-#ifdef weak_alias\n weak_alias (_IO_setbuffer, setbuffer)\n-#endif\ndiff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c\nindex b242018c0b..eda49ab3aa 100644\n--- a/libio/iosetvbuf.c\n+++ b/libio/iosetvbuf.c\n@@ -95,6 +95,4 @@ unlock_return:\n }\n libc_hidden_def (_IO_setvbuf)\n \n-#ifdef weak_alias\n weak_alias (_IO_setvbuf, setvbuf)\n-#endif\ndiff --git a/libio/ioungetc.c b/libio/ioungetc.c\nindex 917cad8abb..cb59e0eb98 100644\n--- a/libio/ioungetc.c\n+++ b/libio/ioungetc.c\n@@ -41,6 +41,4 @@ _IO_ungetc (int c, _IO_FILE *fp)\n return result;\n }\n \n-#ifdef weak_alias\n weak_alias (_IO_ungetc, ungetc)\n-#endif\ndiff --git a/libio/libioP.h b/libio/libioP.h\nindex 1832b44cc7..0613439ad4 100644\n--- a/libio/libioP.h\n+++ b/libio/libioP.h\n@@ -35,31 +35,12 @@\n #include <stddef.h>\n \n #include <errno.h>\n-#ifndef __set_errno\n-# define __set_errno(Val) errno = (Val)\n-#endif\n-#if defined __GLIBC__ && __GLIBC__ >= 2\n-# include <libc-lock.h>\n-#else\n-/*# include <comthread.h>*/\n-#endif\n+#include <libc-lock.h>\n \n #include <math_ldbl_opt.h>\n \n #include \"iolibio.h\"\n \n-/* Control of exported symbols. Used in glibc. By default we don't\n- do anything. */\n-#ifndef libc_hidden_proto\n-# define libc_hidden_proto(name)\n-#endif\n-#ifndef libc_hidden_def\n-# define libc_hidden_def(name)\n-#endif\n-#ifndef libc_hidden_weak\n-# define libc_hidden_weak(name)\n-#endif\n-\n #ifdef __cplusplus\n extern \"C\" {\n #endif\n@@ -89,14 +70,12 @@ extern \"C\" {\n * object being acted on (i.e. the 'this' parameter).\n */\n \n-#ifdef _LIBC\n-# include <shlib-compat.h>\n-# if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)\n- /* Setting this macro disables the use of the _vtable_offset\n- bias in _IO_JUMPS_FUNCS, below. That is only needed if we\n- want to support old binaries (see oldfileops.c). */\n-# define _G_IO_NO_BACKWARD_COMPAT 1\n-# endif\n+#include <shlib-compat.h>\n+#if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)\n+ /* Setting this macro disables the use of the _vtable_offset bias in\n+ _IO_JUMPS_FUNCS, below. That is only needed if we want to\n+ support old binaries (see oldfileops.c). */\n+# define _G_IO_NO_BACKWARD_COMPAT 1\n #endif\n \n #if (!defined _IO_USE_OLD_IO_FILE \\\n@@ -524,19 +503,13 @@ extern int _IO_old_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *);\n extern void _IO_old_init (_IO_FILE *fp, int flags) __THROW;\n \n \n-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n-# define _IO_do_flush(_f) \\\n+#define _IO_do_flush(_f) \\\n ((_f)->_mode <= 0\t\t\t\t\t\t\t \\\n ? _IO_do_write(_f, (_f)->_IO_write_base,\t\t\t\t \\\n \t\t (_f)->_IO_write_ptr-(_f)->_IO_write_base)\t\t \\\n : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base,\t\t \\\n \t\t ((_f)->_wide_data->_IO_write_ptr\t\t\t \\\n \t\t - (_f)->_wide_data->_IO_write_base)))\n-#else\n-# define _IO_do_flush(_f) \\\n- _IO_do_write(_f, (_f)->_IO_write_base,\t\t\t\t \\\n-\t (_f)->_IO_write_ptr-(_f)->_IO_write_base)\n-#endif\n #define _IO_old_do_flush(_f) \\\n _IO_old_do_write(_f, (_f)->_IO_write_base, \\\n \t\t (_f)->_IO_write_ptr-(_f)->_IO_write_base)\n@@ -719,18 +692,6 @@ extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int)\n #ifndef EOF\n # define EOF (-1)\n #endif\n-#ifndef NULL\n-# if defined __GNUG__ && \\\n- (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))\n-# define NULL (__null)\n-# else\n-# if !defined(__cplusplus)\n-# define NULL ((void*)0)\n-# else\n-# define NULL (0)\n-# endif\n-# endif\n-#endif\n \n #if _G_HAVE_MMAP\n \n@@ -750,19 +711,6 @@ extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int)\n \n #endif /* _G_HAVE_MMAP */\n \n-#if _G_HAVE_MMAP\n-\n-# ifdef _LIBC\n-/* When using this code in the GNU libc we must not pollute the name space. */\n-# define mmap __mmap\n-# define munmap __munmap\n-# define ftruncate __ftruncate\n-# endif\n-#endif /* _G_HAVE_MMAP */\n-\n-#ifndef OS_FSTAT\n-# define OS_FSTAT fstat\n-#endif\n extern int _IO_vscanf (const char *, _IO_va_list) __THROW;\n \n /* _IO_pos_BAD is an _IO_off64_t value indicating error, unknown, or EOF. */\n@@ -790,19 +738,11 @@ extern int _IO_vscanf (const char *, _IO_va_list) __THROW;\n \t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \\\n \t 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }\n # else\n-# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n-# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \\\n+# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \\\n { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \\\n \t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \\\n \t 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\\\n \t NULL, WDP, 0 }\n-# else\n-# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \\\n- { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \\\n-\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \\\n-\t 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\\\n-\t 0 }\n-# endif\n # endif\n #else\n # ifdef _IO_USE_OLD_IO_FILE\n@@ -811,19 +751,11 @@ extern int _IO_vscanf (const char *, _IO_va_list) __THROW;\n \t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \\\n \t 0, _IO_pos_BAD }\n # else\n-# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n-# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \\\n+# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \\\n { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \\\n \t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \\\n \t 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \\\n \t NULL, WDP, 0 }\n-# else\n-# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \\\n- { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \\\n-\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \\\n-\t 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \\\n-\t 0 }\n-# endif\n # endif\n #endif\n \ndiff --git a/libio/oldfileops.c b/libio/oldfileops.c\nindex 2eceefa68a..671b9822f0 100644\n--- a/libio/oldfileops.c\n+++ b/libio/oldfileops.c\n@@ -30,9 +30,6 @@\n #include <shlib-compat.h>\n #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)\n \n-#ifndef _POSIX_SOURCE\n-# define _POSIX_SOURCE\n-#endif\n #define _IO_USE_OLD_IO_FILE\n #include \"libioP.h\"\n #include <fcntl.h>\n@@ -42,21 +39,6 @@\n #include <errno.h>\n #include <stdlib.h>\n #include <unistd.h>\n-#ifndef errno\n-extern int errno;\n-#endif\n-#ifndef __set_errno\n-# define __set_errno(Val) errno = (Val)\n-#endif\n-\n-\n-#ifdef _LIBC\n-# define open(Name, Flags, Prot) __open (Name, Flags, Prot)\n-# define close(FD) __close (FD)\n-# define lseek(FD, Offset, Whence) __lseek (FD, Offset, Whence)\n-# define read(FD, Buf, NBytes) __read (FD, Buf, NBytes)\n-# define write(FD, Buf, NBytes) __write (FD, Buf, NBytes)\n-#endif\n \n /* An fstream can be in at most one of put mode, get mode, or putback mode.\n Putback mode is a variant of get mode.\n@@ -127,7 +109,6 @@ _IO_old_file_init_internal (struct _IO_FILE_plus *fp)\n \t\t\t - (int) sizeof (struct _IO_FILE_complete));\n fp->file._fileno = -1;\n \n-#if defined SHARED && defined _LIBC\n if (__builtin_expect (&_IO_stdin_used != NULL, 1)\n || (fp != (struct _IO_FILE_plus *) _IO_stdin\n \t && fp != (struct _IO_FILE_plus *) _IO_stdout\n@@ -135,7 +116,6 @@ _IO_old_file_init_internal (struct _IO_FILE_plus *fp)\n /* The object is dynamically allocated and large enough. Initialize\n the _mode element as well. */\n ((struct _IO_FILE_complete *) fp)->_mode = -1;\n-#endif\n }\n \n void\n@@ -221,7 +201,7 @@ _IO_old_file_fopen (_IO_FILE *fp, const char *filename, const char *mode)\n omode = O_RDWR;\n read_write &= _IO_IS_APPENDING;\n }\n- fdesc = open (filename, omode|oflags, oprot);\n+ fdesc = __open (filename, omode|oflags, oprot);\n if (fdesc < 0)\n return NULL;\n fp->_fileno = fdesc;\n@@ -443,10 +423,8 @@ _IO_old_file_sync (_IO_FILE *fp)\n _IO_off_t new_pos = _IO_SYSSEEK (fp, delta, 1);\n if (new_pos != (_IO_off_t) EOF)\n \tfp->_IO_read_end = fp->_IO_read_ptr;\n-#ifdef ESPIPE\n else if (errno == ESPIPE)\n \t; /* Ignore error from unseekable devices. */\n-#endif\n else\n \tretval = EOF;\n }\n@@ -647,7 +625,7 @@ _IO_old_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)\n _IO_ssize_t to_do = n;\n while (to_do > 0)\n {\n- _IO_ssize_t count = write (f->_fileno, data, to_do);\n+ _IO_ssize_t count = __write (f->_fileno, data, to_do);\n if (count == EOF)\n \t{\n \t f->_flags |= _IO_ERR_SEEN;\n@@ -705,12 +683,7 @@ _IO_old_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)\n \tcount = to_do;\n if (count > 20)\n \t{\n-#ifdef _LIBC\n \t f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);\n-#else\n-\t memcpy (f->_IO_write_ptr, s, count);\n-\t f->_IO_write_ptr += count;\n-#endif\n \t s += count;\n \t}\n else\ndiff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c\nindex 7f6180767e..42284263ba 100644\n--- a/libio/oldiofdopen.c\n+++ b/libio/oldiofdopen.c\n@@ -32,10 +32,6 @@\n #include \"libioP.h\"\n #include <fcntl.h>\n \n-#ifndef _IO_fcntl\n-# define _IO_fcntl __fcntl\n-#endif\n-\n _IO_FILE *\n attribute_compat_text_section\n _IO_old_fdopen (int fd, const char *mode)\n@@ -69,11 +65,7 @@ _IO_old_fdopen (int fd, const char *mode)\n }\n if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+'))\n read_write &= _IO_IS_APPENDING;\n-#ifdef F_GETFL\n- fd_flags = _IO_fcntl (fd, F_GETFL);\n-#ifndef O_ACCMODE\n-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)\n-#endif\n+ fd_flags = __fcntl (fd, F_GETFL);\n if (fd_flags == -1\n || ((fd_flags & O_ACCMODE) == O_RDONLY && !(read_write & _IO_NO_WRITES))\n || ((fd_flags & O_ACCMODE) == O_WRONLY && !(read_write & _IO_NO_READS)))\n@@ -97,12 +89,9 @@ _IO_old_fdopen (int fd, const char *mode)\n */\n if ((posix_mode & O_APPEND) && !(fd_flags & O_APPEND))\n {\n-#ifdef F_SETFL\n- if (_IO_fcntl (fd, F_SETFL, fd_flags | O_APPEND) == -1)\n-#endif\n+ if (__fcntl (fd, F_SETFL, fd_flags | O_APPEND) == -1)\n \treturn NULL;\n }\n-#endif\n \n new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));\n if (new_f == NULL)\ndiff --git a/libio/oldiofgetpos.c b/libio/oldiofgetpos.c\nindex 9781b46d73..4d5d4f8ceb 100644\n--- a/libio/oldiofgetpos.c\n+++ b/libio/oldiofgetpos.c\n@@ -45,20 +45,16 @@ _IO_old_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n return EOF;\n }\n posp->__pos = pos;\n return 0;\n }\n \n-#ifdef weak_alias\n compat_symbol (libc, _IO_old_fgetpos, _IO_fgetpos, GLIBC_2_0);\n strong_alias (_IO_old_fgetpos, __old_fgetpos)\n compat_symbol (libc, __old_fgetpos, fgetpos, GLIBC_2_0);\n-#endif\n \n #endif\ndiff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c\nindex 2221f9140b..3ba8941e90 100644\n--- a/libio/oldiofgetpos64.c\n+++ b/libio/oldiofgetpos64.c\n@@ -45,20 +45,16 @@ _IO_old_fgetpos64 (_IO_FILE *fp, _IO_fpos64_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n return EOF;\n }\n posp->__pos = pos;\n return 0;\n }\n \n-#ifdef weak_alias\n compat_symbol (libc, _IO_old_fgetpos64, _IO_fgetpos64, GLIBC_2_1);\n strong_alias (_IO_old_fgetpos64, __old_fgetpos64)\n compat_symbol (libc, __old_fgetpos64, fgetpos64, GLIBC_2_1);\n-#endif\n \n #endif\ndiff --git a/libio/oldiofsetpos.c b/libio/oldiofsetpos.c\nindex d711937263..4f93bf3578 100644\n--- a/libio/oldiofsetpos.c\n+++ b/libio/oldiofsetpos.c\n@@ -41,10 +41,8 @@ _IO_old_fsetpos (_IO_FILE *fp, const _IO_fpos_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n result = EOF;\n }\n else\n@@ -53,10 +51,8 @@ _IO_old_fsetpos (_IO_FILE *fp, const _IO_fpos_t *posp)\n return result;\n }\n \n-#ifdef weak_alias\n compat_symbol (libc, _IO_old_fsetpos, _IO_fsetpos, GLIBC_2_0);\n strong_alias (_IO_old_fsetpos, __old_fsetpos)\n compat_symbol (libc, __old_fsetpos, fsetpos, GLIBC_2_0);\n-#endif\n \n #endif\ndiff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c\nindex 7fad4081a1..391cf5cf2a 100644\n--- a/libio/oldiofsetpos64.c\n+++ b/libio/oldiofsetpos64.c\n@@ -42,10 +42,8 @@ _IO_old_fsetpos64 (_IO_FILE *fp, const _IO_fpos64_t *posp)\n {\n /* ANSI explicitly requires setting errno to a positive value on\n \t failure. */\n-#ifdef EIO\n if (errno == 0)\n \t__set_errno (EIO);\n-#endif\n result = EOF;\n }\n else\n@@ -54,10 +52,8 @@ _IO_old_fsetpos64 (_IO_FILE *fp, const _IO_fpos64_t *posp)\n return result;\n }\n \n-#ifdef weak_alias\n compat_symbol (libc, _IO_old_fsetpos64, _IO_fsetpos64, GLIBC_2_1);\n strong_alias (_IO_old_fsetpos64, __old_fsetpos64)\n compat_symbol (libc, __old_fsetpos64, fsetpos64, GLIBC_2_1);\n-#endif\n \n #endif\ndiff --git a/libio/oldiopopen.c b/libio/oldiopopen.c\nindex af7774ae90..2cb67879c3 100644\n--- a/libio/oldiopopen.c\n+++ b/libio/oldiopopen.c\n@@ -26,72 +26,17 @@\n in files containing the exception. */\n \n #define _IO_USE_OLD_IO_FILE\n-#ifndef _POSIX_SOURCE\n-# define _POSIX_SOURCE\n-#endif\n #include \"libioP.h\"\n #include <signal.h>\n #include <unistd.h>\n #include <stdlib.h>\n-#ifdef _LIBC\n-# include <unistd.h>\n-#endif\n+#include <unistd.h>\n #include <sys/types.h>\n #include <sys/wait.h>\n \n-#ifndef _IO_fork\n-#ifdef _LIBC\n-#define _IO_fork __fork\n-#else\n-#define _IO_fork fork /* defined in libiberty, if needed */\n-#endif\n-extern _IO_pid_t _IO_fork (void) __THROW;\n-#endif\n-\n #include <shlib-compat.h>\n #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)\n \n-#ifndef _IO_pipe\n-#ifdef _LIBC\n-#define _IO_pipe __pipe\n-#else\n-#define _IO_pipe pipe\n-#endif\n-extern int _IO_pipe (int des[2]) __THROW;\n-#endif\n-\n-#ifndef _IO_dup2\n-#ifdef _LIBC\n-#define _IO_dup2 __dup2\n-#else\n-#define _IO_dup2 dup2\n-#endif\n-extern int _IO_dup2 (int fd, int fd2) __THROW;\n-#endif\n-\n-#ifndef _IO_waitpid\n-#ifdef _LIBC\n-#define _IO_waitpid __waitpid\n-#else\n-#define _IO_waitpid waitpid\n-#endif\n-#endif\n-\n-#ifndef _IO_execl\n-#define _IO_execl execl\n-#endif\n-#ifndef _IO__exit\n-#define _IO__exit _exit\n-#endif\n-\n-#ifndef _IO_close\n-#ifdef _LIBC\n-#define _IO_close __close\n-#else\n-#define _IO_close close\n-#endif\n-#endif\n-\n struct _IO_proc_file\n {\n struct _IO_FILE_complete_plus file;\n@@ -123,7 +68,7 @@ _IO_old_proc_open (_IO_FILE *fp, const char *command, const char *mode)\n _IO_pid_t child_pid;\n if (_IO_file_is_open (fp))\n return NULL;\n- if (_IO_pipe (pipe_fds) < 0)\n+ if (__pipe (pipe_fds) < 0)\n return NULL;\n if (mode[0] == 'r' && mode[1] == '\\0')\n {\n@@ -139,36 +84,36 @@ _IO_old_proc_open (_IO_FILE *fp, const char *command, const char *mode)\n }\n else\n {\n- _IO_close (pipe_fds[0]);\n- _IO_close (pipe_fds[1]);\n+ __close (pipe_fds[0]);\n+ __close (pipe_fds[1]);\n __set_errno (EINVAL);\n return NULL;\n }\n- ((_IO_proc_file *) fp)->pid = child_pid = _IO_fork ();\n+ ((_IO_proc_file *) fp)->pid = child_pid = __fork ();\n if (child_pid == 0)\n {\n int child_std_end = mode[0] == 'r' ? 1 : 0;\n struct _IO_proc_file *p;\n \n- _IO_close (parent_end);\n+ __close (parent_end);\n if (child_end != child_std_end)\n \t{\n-\t _IO_dup2 (child_end, child_std_end);\n-\t _IO_close (child_end);\n+\t __dup2 (child_end, child_std_end);\n+\t __close (child_end);\n \t}\n /* POSIX.2: \"popen() shall ensure that any streams from previous\n popen() calls that remain open in the parent process are closed\n \t in the new child process.\" */\n for (p = old_proc_file_chain; p; p = p->next)\n-\t_IO_close (_IO_fileno ((_IO_FILE *) p));\n+\t__close (_IO_fileno ((_IO_FILE *) p));\n \n- _IO_execl (\"/bin/sh\", \"sh\", \"-c\", command, (char *) 0);\n- _IO__exit (127);\n+ execl (\"/bin/sh\", \"sh\", \"-c\", command, (char *) 0);\n+ _exit (127);\n }\n- _IO_close (child_end);\n+ __close (child_end);\n if (child_pid < 0)\n {\n- _IO_close (parent_end);\n+ __close (parent_end);\n return NULL;\n }\n _IO_fileno (fp) = parent_end;\n@@ -251,7 +196,7 @@ _IO_old_proc_close (_IO_FILE *fp)\n _IO_cleanup_region_end (0);\n #endif\n \n- if (status < 0 || _IO_close (_IO_fileno(fp)) < 0)\n+ if (status < 0 || __close (_IO_fileno(fp)) < 0)\n return -1;\n /* POSIX.2 Rationale: \"Some historical implementations either block\n or ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting\n@@ -259,7 +204,7 @@ _IO_old_proc_close (_IO_FILE *fp)\n described in POSIX.2, such implementations are not conforming.\" */\n do\n {\n- wait_pid = _IO_waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);\n+ wait_pid = __waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);\n }\n while (wait_pid == -1 && errno == EINTR);\n if (wait_pid == -1)\ndiff --git a/libio/putc.c b/libio/putc.c\nindex 6e1fdeef3a..2f48cd15e5 100644\n--- a/libio/putc.c\n+++ b/libio/putc.c\n@@ -36,11 +36,9 @@ libc_hidden_def (_IO_putc)\n \n #undef putc\n \n-#ifdef weak_alias\n weak_alias (_IO_putc, putc)\n \n #ifndef _IO_MTSAFE_IO\n #undef putc_unlocked\n weak_alias (_IO_putc, putc_unlocked)\n #endif\n-#endif\ndiff --git a/libio/stdfiles.c b/libio/stdfiles.c\nindex 218be40e60..24725f0671 100644\n--- a/libio/stdfiles.c\n+++ b/libio/stdfiles.c\n@@ -34,35 +34,20 @@\n #include \"libioP.h\"\n \n #ifdef _IO_MTSAFE_IO\n-# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n-# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \\\n+# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \\\n static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \\\n static struct _IO_wide_data _IO_wide_data_##FD \\\n = { ._wide_vtable = &_IO_wfile_jumps }; \\\n struct _IO_FILE_plus NAME \\\n = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \\\n &_IO_file_jumps};\n-# else\n-# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \\\n- static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \\\n- struct _IO_FILE_plus NAME \\\n- = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \\\n- &_IO_file_jumps};\n-# endif\n #else\n-# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T\n-# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \\\n+# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \\\n static struct _IO_wide_data _IO_wide_data_##FD \\\n = { ._wide_vtable = &_IO_wfile_jumps }; \\\n struct _IO_FILE_plus NAME \\\n = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \\\n &_IO_file_jumps};\n-# else\n-# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \\\n- struct _IO_FILE_plus NAME \\\n- = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \\\n- &_IO_file_jumps};\n-# endif\n #endif\n \n DEF_STDFILE(_IO_2_1_stdin_, 0, 0, _IO_NO_WRITES);\ndiff --git a/libio/stdio.c b/libio/stdio.c\nindex 3ff825241b..33292f0429 100644\n--- a/libio/stdio.c\n+++ b/libio/stdio.c\n@@ -37,12 +37,10 @@ _IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;\n #undef _IO_stdin\n #undef _IO_stdout\n #undef _IO_stderr\n-#ifdef _LIBC\n-# define AL(name) AL2 (name, _IO_##name)\n-# define AL2(name, al) \\\n+#define AL(name) AL2 (name, _IO_##name)\n+#define AL2(name, al) \\\n extern __typeof (name) al __attribute__ ((alias (#name), \\\n visibility (\"hidden\")))\n AL(stdin);\n AL(stdout);\n AL(stderr);\n-#endif\ndiff --git a/libio/wfileops.c b/libio/wfileops.c\nindex fb94f45040..8756b6fe1a 100644\n--- a/libio/wfileops.c\n+++ b/libio/wfileops.c\n@@ -33,24 +33,6 @@\n #include <stdlib.h>\n #include <string.h>\n \n-\n-#ifndef _LIBC\n-# define _IO_new_do_write _IO_do_write\n-# define _IO_new_file_attach _IO_file_attach\n-# define _IO_new_file_close_it _IO_file_close_it\n-# define _IO_new_file_finish _IO_file_finish\n-# define _IO_new_file_fopen _IO_file_fopen\n-# define _IO_new_file_init _IO_file_init\n-# define _IO_new_file_setbuf _IO_file_setbuf\n-# define _IO_new_file_sync _IO_file_sync\n-# define _IO_new_file_overflow _IO_file_overflow\n-# define _IO_new_file_seekoff _IO_file_seekoff\n-# define _IO_new_file_underflow _IO_file_underflow\n-# define _IO_new_file_write _IO_file_write\n-# define _IO_new_file_xsputn _IO_file_xsputn\n-#endif\n-\n-\n /* Convert TO_DO wide character from DATA to FP.\n Then mark FP as having empty buffers. */\n int\n@@ -541,10 +523,8 @@ _IO_wfile_sync (_IO_FILE *fp)\n \t fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;\n \t fp->_IO_read_end = fp->_IO_read_ptr;\n \t}\n-#ifdef ESPIPE\n else if (errno == ESPIPE)\n \t; /* Ignore error from unseekable devices. */\n-#endif\n else\n \tretval = WEOF;\n }\n@@ -1010,13 +990,8 @@ _IO_wfile_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)\n \tcount = to_do;\n if (count > 20)\n \t{\n-#ifdef _LIBC\n \t f->_wide_data->_IO_write_ptr =\n \t __wmempcpy (f->_wide_data->_IO_write_ptr, s, count);\n-#else\n-\t wmemcpy (f->_wide_data->_IO_write_ptr, s, count);\n-\t f->_wide_data->_IO_write_ptr += count;\n-#endif\n \t s += count;\n \t}\n else\ndiff --git a/libio/wgenops.c b/libio/wgenops.c\nindex d8072abea0..a309de47b4 100644\n--- a/libio/wgenops.c\n+++ b/libio/wgenops.c\n@@ -34,16 +34,7 @@\n #include <wchar.h>\n \n \n-#ifndef _LIBC\n-# define __wmemcpy(dst, src, n) wmemcpy (dst, src, n)\n-#endif\n-\n-\n-static int save_for_wbackup (_IO_FILE *fp, wchar_t *end_p) __THROW\n-#ifdef _LIBC\n- internal_function\n-#endif\n- ;\n+static int save_for_wbackup (_IO_FILE *fp, wchar_t *end_p) __THROW;\n \n /* Return minimum _pos markers\n Assumes the current get area is the main get area. */\n@@ -307,13 +298,8 @@ _IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)\n \t count = more;\n \t if (count > 20)\n \t {\n-#ifdef _LIBC\n \t f->_wide_data->_IO_write_ptr =\n \t\t__wmempcpy (f->_wide_data->_IO_write_ptr, s, count);\n-#else\n-\t memcpy (f->_wide_data->_IO_write_ptr, s, count);\n-\t f->_wide_data->_IO_write_ptr += count;\n-#endif\n \t s += count;\n }\n \t else if (count <= 0)\n@@ -353,12 +339,7 @@ _IO_wdefault_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)\n \t count = more;\n \t if (count > 20)\n \t {\n-#ifdef _LIBC\n \t s = __wmempcpy (s, fp->_wide_data->_IO_read_ptr, count);\n-#else\n-\t memcpy (s, fp->_wide_data->_IO_read_ptr, count);\n-\t s += count;\n-#endif\n \t fp->_wide_data->_IO_read_ptr += count;\n \t }\n \t else if (count <= 0)\n@@ -466,9 +447,6 @@ _IO_switch_to_wput_mode (_IO_FILE *fp)\n \n \n static int\n-#ifdef _LIBC\n-internal_function\n-#endif\n save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)\n {\n /* Append [_IO_read_base..end_p] to backup area. */\n@@ -492,32 +470,17 @@ save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)\n \treturn EOF;\t\t/* FIXME */\n if (least_mark < 0)\n \t{\n-#ifdef _LIBC\n \t __wmempcpy (__wmempcpy (new_buffer + avail,\n \t\t\t\t fp->_wide_data->_IO_save_end + least_mark,\n \t\t\t\t -least_mark),\n \t\t fp->_wide_data->_IO_read_base,\n \t\t end_p - fp->_wide_data->_IO_read_base);\n-#else\n-\t memcpy (new_buffer + avail,\n-\t\t fp->_wide_data->_IO_save_end + least_mark,\n-\t\t -least_mark * sizeof (wchar_t));\n-\t memcpy (new_buffer + avail - least_mark,\n-\t\t fp->_wide_data->_IO_read_base,\n-\t\t (end_p - fp->_wide_data->_IO_read_base) * sizeof (wchar_t));\n-#endif\n \t}\n else\n \t{\n-#ifdef _LIBC\n \t __wmemcpy (new_buffer + avail,\n \t\t fp->_wide_data->_IO_read_base + least_mark,\n \t\t needed_size);\n-#else\n-\t memcpy (new_buffer + avail,\n-\t\t fp->_wide_data->_IO_read_base + least_mark,\n-\t\t needed_size * sizeof (wchar_t));\n-#endif\n \t}\n free (fp->_wide_data->_IO_save_base);\n fp->_wide_data->_IO_save_base = new_buffer;\n@@ -528,32 +491,17 @@ save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)\n avail = current_Bsize - needed_size;\n if (least_mark < 0)\n \t{\n-#ifdef _LIBC\n \t __wmemmove (fp->_wide_data->_IO_save_base + avail,\n \t\t fp->_wide_data->_IO_save_end + least_mark,\n \t\t -least_mark);\n \t __wmemcpy (fp->_wide_data->_IO_save_base + avail - least_mark,\n \t\t fp->_wide_data->_IO_read_base,\n \t\t end_p - fp->_wide_data->_IO_read_base);\n-#else\n-\t memmove (fp->_wide_data->_IO_save_base + avail,\n-\t\t fp->_wide_data->_IO_save_end + least_mark,\n-\t\t -least_mark * sizeof (wchar_t));\n-\t memcpy (fp->_wide_data->_IO_save_base + avail - least_mark,\n-\t\t fp->_wide_data->_IO_read_base,\n-\t\t (end_p - fp->_wide_data->_IO_read_base) * sizeof (wchar_t));\n-#endif\n \t}\n else if (needed_size > 0)\n-#ifdef _LIBC\n \t__wmemcpy (fp->_wide_data->_IO_save_base + avail,\n \t\t fp->_wide_data->_IO_read_base + least_mark,\n \t\t needed_size);\n-#else\n-\tmemcpy (fp->_wide_data->_IO_save_base + avail,\n-\t\tfp->_wide_data->_IO_read_base + least_mark,\n-\t\tneeded_size * sizeof (wchar_t));\n-#endif\n }\n fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_base + avail;\n /* Adjust all the streammarkers. */\n", "prefixes": [] }