2025-01-01 18:14:45 +00:00
|
|
|
/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
|
1997-06-23 21:55:26 +00:00
|
|
|
This file is part of the GNU C Library.
|
1997-05-21 01:48:59 +00:00
|
|
|
|
1997-06-23 21:55:26 +00:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1997-05-21 01:48:59 +00:00
|
|
|
|
1997-06-23 21:55:26 +00:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1997-05-21 01:48:59 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
1997-05-21 01:48:59 +00:00
|
|
|
|
1997-08-27 20:26:10 +00:00
|
|
|
#include <errno.h>
|
1997-05-21 01:48:59 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
Update.
1998-01-30 19:58 Ulrich Drepper <drepper@cygnus.com>
* include/cpio.h: Move to ...
* posix/cpio.h: ...here.
* locale/programs/ld-collate.c: Fix typo.
* signal/signal.h: Declare _sys_siglist with NSIG+1 elements.
* stdio-common/tiformat.c: Add checks for %#.0o and friends.
* login/utmp_file.c (pututline_file): Don't always report success
if similar entry is found. Patch by Mark M. Kettenis.
1998-01-30 16:06 Philip Blundell <pb@nexus.co.uk>
* manual/Makefile: Don't try to install the info files if makeinfo
is not available.
1998-01-30 12:05 Philip Blundell <pb@nexus.co.uk>
* sysdeps/unix/sysv/linux/bits/ioctls.h: Include a copy of the
kernel's network ioctls, rather than using <linux/sockios.h> to
get them. This way we are sure of maintaining compatibility if
the kernel interface should change.
1998-01-30 15:52 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Dist: Add netrose/rose.h.
1998-01-25 19:54 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/unix/sysv/linux/netrose/rose.h: New file.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Install it.
1998-01-27 22:29 Zack Weinberg <zack@rabi.phys.columbia.edu>
Implement System V pseudoterminal handling.
* login/Makefile
(routines): Add getpt, grantpt, unlockpt, ptsname.
(libutil-routines): Remove pty. Add openpty, forkpty.
(distribute): New internal header pty-internal.h.
(others): Add the helper program, pt_chown.
(install-others): Install it, in $(libexecdir), mode 4755.
* login/pty-internal.h: New file.
* login/openpty.c: New file.
* login/forkpty.c: New file.
* login/programs/pt_chown.c: New file.
* libc.map: Add getpt, grantpt, unlockpt, ptsname, ptsname_r.
* stdlib/stdlib.h: Prototype them.
* config.make.in: Define $(libexecdir).
* Makeconfig: Define $(inst_libexecdir).
* sysdeps/generic/pty.c: Removed.
* sysdeps/unix/sysv/linux/pty.c: Removed.
* sysdeps/generic/getpt.c: Stub out.
* sysdeps/generic/grantpt.c: Likewise.
* sysdeps/generic/ptsname.c: Likewise.
* sysdeps/generic/unlockpt.c: Likewise.
* sysdeps/unix/grantpt.c: New file.
* sysdeps/unix/bsd/getpt.c: New file.
* sysdeps/unix/bsd/unlockpt.c: New file.
* sysdeps/unix/sysv/linux/getpt.c: New file.
* sysdeps/unix/sysv/linux/ptsname.c: New file.
* sysdeps/unix/sysv/linux/unlockpt.c: New file.
1998-01-29 23:56 Ulrich Drepper <drepper@cygnus.com>
* localedata/locales/ru_RU: Fix YESEXPR. Patch by lav@yars.free.net.
1998-01-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* nss/Makefile (tests): Add rule for test-netdb.c.
* nss/test-netdb.c: New file.
1998-01-29 02:38 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-open.c (_dl_open): Make sure the variable `reloc' is
really kept as a variable. Patch by Richard Henderson,
reported by Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>.
* elf/rtld.c (dl_main): Call _dl_init_paths before handling preloading.
* elf/genrtldtbl.awk: Mark machine dependent directory of generated
entries as not existing.
1998-01-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdio-common/vfprintf.c (process_arg): Fix printing of octal
zero in alternate form with precision of zero, which must produce
"0". Add braces to avoid ambiguous `else'.
1998-01-26 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nss_compat/compat-grp.c: Fix memory leak and trailing null
problem with strncpy.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/comapt-spwd.c: Likewise.
1998-01-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* assert/assert.h (assert_perror): Correct test for errnum. Patch
by uch@nop.or.jp. [PR libc/437]
1997-12-20 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* locales/pl_PL: Fix int_curr_symbol.
1998-01-26 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* nis/nis_cache.c: Include <unistd.h> for declaration of close.
1998-01-06 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* stdio-common/test-popen.c: Include <errno.h>.
* sysdeps/unix/sysv/linux/if_index.c: Include <unistd.h> for
close.
* inet/getnetgrent_r.c: Include <errno.h>.
* db2/db/db_conv.c: Include <string.h> for memcpy.
* gmon/bb_exit_func.c: Include <string.h> instead of <strings.h>
so that memcpy is declared.
* iconv/iconv_open.c: Include <stdlib.h> for alloca.
* misc/init-misc.c: Remove unneeded inclusion of <errno.h>.
1998-01-26 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* pwd/fgetpwent_r.c (__fgetpwent_r): Correctly handle buffer
overflow while reading line with fgets.
* grp/fgetgrent_r.c (__fgetgrent_r): Likewise.
1998-01-27 00:46 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/bits/types.h (__ipc_pid_t): Change to
unsigned short, not short.
Reported by Andreas Jaeger.
1998-01-06 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/mips/syscalls.list: Correct typo
(ccept->accept).
* sysdeps/generic/inttypes.h: Fix spelling.
1998-01-04 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/arm/Dist: Add bits/mman.h.
* sysdeps/unix/sysv/linux/alpha/Dist: Add net/route.h.
1998-01-27 00:30 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/printf.h (struct print_info): Add new bitfield is_char.
* stdio-common/printf-parse.h (parse_one_spec): Fill in is_char
field for hh modifier.
* stdio-common/vfprint.c: Use is_char field and do not depend in
is_short having the value 2.
Bug reported by Andreas Jaeger.
1998-01-05 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libio/freopen.c (freopen): Call _IO_old_freopen only if defined
PIC && DO_VERSIONING.
1998-01-24 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Rules: Add rules for $(common-objpfx)dummy$o.
1998-01-30 11:44:34 +00:00
|
|
|
#include <unistd.h>
|
1997-05-21 01:48:59 +00:00
|
|
|
#include <net/if.h>
|
1997-08-02 21:00:51 +00:00
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/ioctl.h>
|
2015-09-08 21:11:03 +00:00
|
|
|
#include <libc-lock.h>
|
2003-09-13 05:52:57 +00:00
|
|
|
#include <not-cancel.h>
|
1997-05-21 01:48:59 +00:00
|
|
|
|
2004-06-30 07:43:11 +00:00
|
|
|
#include "netlinkaccess.h"
|
|
|
|
|
1999-06-07 00:02:14 +00:00
|
|
|
|
1997-08-02 21:00:51 +00:00
|
|
|
unsigned int
|
2014-12-16 18:18:49 +00:00
|
|
|
__if_nametoindex (const char *ifname)
|
1997-05-21 01:48:59 +00:00
|
|
|
{
|
2017-11-15 16:58:48 +00:00
|
|
|
if (strlen (ifname) >= IFNAMSIZ)
|
|
|
|
{
|
|
|
|
__set_errno (ENODEV);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-27 15:12:43 +00:00
|
|
|
int fd = __opensock ();
|
|
|
|
if (fd < 0)
|
|
|
|
return 0;
|
|
|
|
|
2025-06-05 18:04:46 +00:00
|
|
|
struct ifreq ifr;
|
|
|
|
strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
|
|
|
|
|
|
|
|
int status = __ioctl (fd, SIOCGIFINDEX, &ifr);
|
2017-07-03 18:22:58 +00:00
|
|
|
__close_nocancel_nostatus (fd);
|
2025-06-05 18:04:46 +00:00
|
|
|
|
|
|
|
return status < 0 ? 0 : ifr.ifr_ifindex;
|
1997-05-21 01:48:59 +00:00
|
|
|
}
|
2014-12-16 18:18:49 +00:00
|
|
|
libc_hidden_def (__if_nametoindex)
|
|
|
|
weak_alias (__if_nametoindex, if_nametoindex)
|
|
|
|
libc_hidden_weak (if_nametoindex)
|
2002-08-13 01:08:15 +00:00
|
|
|
|
1997-05-21 01:48:59 +00:00
|
|
|
|
1997-08-02 21:00:51 +00:00
|
|
|
void
|
2014-12-16 18:18:49 +00:00
|
|
|
__if_freenameindex (struct if_nameindex *ifn)
|
1997-05-21 01:48:59 +00:00
|
|
|
{
|
|
|
|
struct if_nameindex *ptr = ifn;
|
1997-06-23 21:55:26 +00:00
|
|
|
while (ptr->if_name || ptr->if_index)
|
1997-05-21 01:48:59 +00:00
|
|
|
{
|
2004-06-30 07:43:11 +00:00
|
|
|
free (ptr->if_name);
|
1997-08-02 21:00:51 +00:00
|
|
|
++ptr;
|
1997-05-21 01:48:59 +00:00
|
|
|
}
|
1997-08-02 21:00:51 +00:00
|
|
|
free (ifn);
|
1997-05-21 01:48:59 +00:00
|
|
|
}
|
2014-12-16 18:18:49 +00:00
|
|
|
libc_hidden_def (__if_freenameindex)
|
|
|
|
weak_alias (__if_freenameindex, if_freenameindex)
|
|
|
|
libc_hidden_weak (if_freenameindex)
|
1997-05-21 01:48:59 +00:00
|
|
|
|
2004-06-30 07:43:11 +00:00
|
|
|
|
2025-06-05 18:04:46 +00:00
|
|
|
struct if_nameindex *
|
|
|
|
__if_nameindex (void)
|
2004-06-30 07:43:11 +00:00
|
|
|
{
|
|
|
|
struct netlink_handle nh = { 0, 0, 0, NULL, NULL };
|
|
|
|
struct if_nameindex *idx = NULL;
|
|
|
|
|
2012-07-25 21:19:13 +00:00
|
|
|
if (__netlink_open (&nh) < 0)
|
2004-06-30 07:43:11 +00:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
|
|
/* Tell the kernel that we wish to get a list of all
|
2005-06-14 00:56:49 +00:00
|
|
|
active interfaces. Collect all data for every interface. */
|
|
|
|
if (__netlink_request (&nh, RTM_GETLINK) < 0)
|
2004-06-30 07:43:11 +00:00
|
|
|
goto exit_free;
|
|
|
|
|
|
|
|
/* Count the interfaces. */
|
|
|
|
unsigned int nifs = 0;
|
|
|
|
for (struct netlink_res *nlp = nh.nlm_list; nlp; nlp = nlp->next)
|
|
|
|
{
|
|
|
|
struct nlmsghdr *nlh;
|
|
|
|
size_t size = nlp->size;
|
|
|
|
|
|
|
|
if (nlp->nlh == NULL)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Walk through all entries we got from the kernel and look, which
|
|
|
|
message type they contain. */
|
|
|
|
for (nlh = nlp->nlh; NLMSG_OK (nlh, size); nlh = NLMSG_NEXT (nlh, size))
|
|
|
|
{
|
|
|
|
/* Check if the message is what we want. */
|
|
|
|
if ((pid_t) nlh->nlmsg_pid != nh.pid || nlh->nlmsg_seq != nlp->seq)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (nlh->nlmsg_type == NLMSG_DONE)
|
|
|
|
break; /* ok */
|
|
|
|
|
|
|
|
if (nlh->nlmsg_type == RTM_NEWLINK)
|
|
|
|
++nifs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
idx = malloc ((nifs + 1) * sizeof (struct if_nameindex));
|
|
|
|
if (idx == NULL)
|
|
|
|
{
|
|
|
|
nomem:
|
|
|
|
__set_errno (ENOBUFS);
|
|
|
|
goto exit_free;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add the interfaces. */
|
|
|
|
nifs = 0;
|
|
|
|
for (struct netlink_res *nlp = nh.nlm_list; nlp; nlp = nlp->next)
|
|
|
|
{
|
|
|
|
struct nlmsghdr *nlh;
|
|
|
|
size_t size = nlp->size;
|
|
|
|
|
|
|
|
if (nlp->nlh == NULL)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Walk through all entries we got from the kernel and look, which
|
|
|
|
message type they contain. */
|
|
|
|
for (nlh = nlp->nlh; NLMSG_OK (nlh, size); nlh = NLMSG_NEXT (nlh, size))
|
|
|
|
{
|
|
|
|
/* Check if the message is what we want. */
|
|
|
|
if ((pid_t) nlh->nlmsg_pid != nh.pid || nlh->nlmsg_seq != nlp->seq)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (nlh->nlmsg_type == NLMSG_DONE)
|
|
|
|
break; /* ok */
|
|
|
|
|
|
|
|
if (nlh->nlmsg_type == RTM_NEWLINK)
|
|
|
|
{
|
|
|
|
struct ifinfomsg *ifim = (struct ifinfomsg *) NLMSG_DATA (nlh);
|
|
|
|
struct rtattr *rta = IFLA_RTA (ifim);
|
|
|
|
size_t rtasize = IFLA_PAYLOAD (nlh);
|
|
|
|
|
|
|
|
idx[nifs].if_index = ifim->ifi_index;
|
|
|
|
|
|
|
|
while (RTA_OK (rta, rtasize))
|
|
|
|
{
|
|
|
|
char *rta_data = RTA_DATA (rta);
|
|
|
|
size_t rta_payload = RTA_PAYLOAD (rta);
|
|
|
|
|
|
|
|
if (rta->rta_type == IFLA_IFNAME)
|
|
|
|
{
|
|
|
|
idx[nifs].if_name = __strndup (rta_data, rta_payload);
|
|
|
|
if (idx[nifs].if_name == NULL)
|
|
|
|
{
|
|
|
|
idx[nifs].if_index = 0;
|
2014-12-16 18:18:49 +00:00
|
|
|
__if_freenameindex (idx);
|
2004-06-30 07:43:11 +00:00
|
|
|
idx = NULL;
|
|
|
|
goto nomem;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
rta = RTA_NEXT (rta, rtasize);
|
|
|
|
}
|
|
|
|
|
|
|
|
++nifs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
idx[nifs].if_index = 0;
|
|
|
|
idx[nifs].if_name = NULL;
|
|
|
|
|
|
|
|
exit_free:
|
|
|
|
__netlink_free_handle (&nh);
|
|
|
|
__netlink_close (&nh);
|
|
|
|
|
|
|
|
return idx;
|
|
|
|
}
|
2014-12-16 18:18:49 +00:00
|
|
|
weak_alias (__if_nameindex, if_nameindex)
|
|
|
|
libc_hidden_weak (if_nameindex)
|
2004-06-30 07:43:11 +00:00
|
|
|
|
1997-08-02 21:00:51 +00:00
|
|
|
|
|
|
|
char *
|
2021-05-06 16:56:25 +00:00
|
|
|
__if_indextoname (unsigned int ifindex, char ifname[IF_NAMESIZE])
|
1997-08-02 21:00:51 +00:00
|
|
|
{
|
1997-08-20 03:53:21 +00:00
|
|
|
/* We may be able to do the conversion directly, rather than searching a
|
|
|
|
list. This ioctl is not present in kernels before version 2.1.50. */
|
|
|
|
struct ifreq ifr;
|
|
|
|
int fd;
|
2012-05-14 14:11:02 +00:00
|
|
|
int status;
|
1999-06-07 00:02:14 +00:00
|
|
|
|
2012-05-14 14:11:02 +00:00
|
|
|
fd = __opensock ();
|
2004-06-17 23:06:41 +00:00
|
|
|
|
2012-05-14 14:11:02 +00:00
|
|
|
if (fd < 0)
|
|
|
|
return NULL;
|
1997-08-20 03:53:21 +00:00
|
|
|
|
2012-05-14 14:11:02 +00:00
|
|
|
ifr.ifr_ifindex = ifindex;
|
|
|
|
status = __ioctl (fd, SIOCGIFNAME, &ifr);
|
1997-08-20 03:53:21 +00:00
|
|
|
|
2017-07-03 18:22:58 +00:00
|
|
|
__close_nocancel_nostatus (fd);
|
1997-08-20 03:53:21 +00:00
|
|
|
|
2012-05-14 14:11:02 +00:00
|
|
|
if (status < 0)
|
Update.
1997-08-04 15:29 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/localedef.c (main): Set bit in avail for those
categories which are successfully read.
* locale/programs/locfile.c (check_all_categories): Don't check
categories if they are not available.
(write_all_categories): Don't write categories if they are not
available.
* login/setutent_r.c (setutent_unknown): Change return type to
int and return result of called function.
* manual/arith.texi: Mark floating-point test macro from ISO C 9X
as macros (not functions).
* manual/libc.texinfo (UPDATED): Update.
* manual/math.texi: Document exceptions, functions to handle
exceptions, mathematical constants, FP comparison functions
and several new functions from ISO C 9X.
Change parameter of drand48, lrand48, and mrand48 to void (not
empty).
* manual/pattern.texi: Remove paragraph which explained that wordexp
is executed by running a shell.
* manual/time.texi: Explain difficulties with strftime if the
functions returns 0 and no error occurred.
* math/math.h: Correct comment for some M_* constants.
(isgreater, isgreaterequal, isless, islessequal, islessgreater,
inunordered): Rewrite to make sure the arguments are evaluated
exactly once.
* nis/rpcsvc/nis.x: Undo last change.
* nis/rpcsvc/nis.h: Likewise.
* nis/rpcsvc/nislib.h: File moved back to here.
* posix/sys/types.h: Don't define socklen_t. Pretty print.
* socket/sys/socket.h (bind, getsockname, connect, sendto, recvfrom,
getsockopt, setsockopt, accept): Change size argument to type
socklen_t.
Pretty print.
* manual/socket.texi: Describe socklen_t and change prototypes of
socket functions to use socklen_t.
* sysdeps/generic/bits/socket.h: Define socklen_t.
(struct msghdr): Correct types to use socklen_t.
* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise.
* stdio-common/printf_fp.c (__printf_fp): Correct rouding of number
1.0 < x < 8.0.
* stdio-common/tfformat.c: Add new tests for above bug.
* stdlib/strtod.c: Fix typo.
* string/Makefile (headers): Add bits/string.h.
(CFLAGS-*): Add -D__NO_STRING_INLINES.
* string/string.h: Include <bits/string.h> if optimizing and
__NO_STRING_INLINES is not defined.
* sysdeps/stub/bits/string.h: New file.
* sysdeps/powerpc/bits/fenv.h: Fix typos.
* sysdeps/unix/sysv/linux/if_index.c: Let functions return ENOSYS
if SIOGIFINDEX is not defined.
* sysdeps/wordsize-32/inttypes.h: Pretty print.
* sysdeps/wordsize-64/inttypes.h: Pretty print.
* termios/cfsetspeed.c: Rewrite loop to do what it shall do.
* wcsmbs/Makefile (tests): Add tst-wcstof.
* wcsmbs/tst-wcstof.c: New file.
1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/__longjmp.c: Replace call to abort by infinite
loop, to avoid dragging stdio into the dynamic linker.
1997-08-02 19:44 H.J. Lu <hjl@gnu.ai.mit.edu>
* nis/nis_findserv.c (xid, xid_seed, xid_lookup): Make them
u_int32_t.
1997-08-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* posix/wordexp.c (parse_tilde): Fix calls to __getpwnam_r and
__getpwuid_r.
Include <stdio.h> to get prototypes of *printf.
(exec_comm): Remove unneeded variable *sh.
* libc.map: Add wordexp, wordfree.
* posix/Makefile (routines): Add wordexp.
1997-08-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* posix/wordexp.c: Correct typo in comment.
(wordexp): Likewise.
* manual/errno.texi (Error Codes): Fix typo.
1997-08-03 15:28 Ulrich Drepper <drepper@cygnus.com>
* csu/initfini.c (SECTION): Don't put quotes around section name
since this is not understood by all assemblers.
Patch by Klaus Espenlaub <kespenla@hydra.informatik.uni-ulm.de>.
1997-08-04 14:31:26 +00:00
|
|
|
{
|
2012-05-14 14:11:02 +00:00
|
|
|
if (errno == ENODEV)
|
|
|
|
/* POSIX requires ENXIO. */
|
2004-06-17 23:06:41 +00:00
|
|
|
__set_errno (ENXIO);
|
1999-08-25 17:19:50 +00:00
|
|
|
|
2012-05-14 14:11:02 +00:00
|
|
|
return NULL;
|
1999-08-25 17:19:50 +00:00
|
|
|
}
|
|
|
|
else
|
2012-05-14 14:11:02 +00:00
|
|
|
return strncpy (ifname, ifr.ifr_name, IFNAMSIZ);
|
1999-08-25 17:19:50 +00:00
|
|
|
}
|
2014-12-16 18:18:49 +00:00
|
|
|
weak_alias (__if_indextoname, if_indextoname)
|
|
|
|
libc_hidden_weak (if_indextoname)
|