mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 02:40:08 +00:00
Update.
* libio/iofopncook.c (_IO_cookie_seek): Correct return value. Patch by Peter Miller <millerp@canb.auug.org.au>. 1999-04-27 Thorsten Kukuk <kukuk@suse.de> * sunrpc/pmap_clnt.c: Add own get_myaddress function, which prefers loopback device. 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
This commit is contained in:
parent
66f93c2d97
commit
925ed47cfb
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
1999-04-28 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* libio/iofopncook.c (_IO_cookie_seek): Correct return value.
|
||||
Patch by Peter Miller <millerp@canb.auug.org.au>.
|
||||
|
||||
1999-04-27 Thorsten Kukuk <kukuk@suse.de>
|
||||
|
||||
* sunrpc/pmap_clnt.c: Add own get_myaddress function, which
|
||||
prefers loopback device.
|
||||
|
||||
1999-04-28 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* posix/fnmatch.c (internal_fnmatch): Finish incomplete
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU IO Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@ -81,10 +81,7 @@ _IO_cookie_seek (fp, offset, dir)
|
||||
pos = _IO_pos_0;
|
||||
_IO_pos_adjust (pos, offset);
|
||||
|
||||
if (cfile->io_functions.seek (cfile->cookie, pos, dir))
|
||||
return _IO_pos_BAD;
|
||||
|
||||
return pos;
|
||||
return cfile->io_functions.seek (cfile->cookie, pos, dir);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -51,8 +51,8 @@ CHARMAP
|
||||
<D4> /x14 <U0014> DEVICE CONTROL FOUR (DC4)
|
||||
<NAK> /x15 <U0015> NEGATIVE ACKNOWLEDGE (NAK)
|
||||
<NK> /x15 <U0015> NEGATIVE ACKNOWLEDGE (NAK)
|
||||
<SYN> /x16 <U0016> SYNCRONOUS IDLE (SYN)
|
||||
<SY> /x16 <U0016> SYNCRONOUS IDLE (SYN)
|
||||
<SYN> /x16 <U0016> SYNCHRONOUS IDLE (SYN)
|
||||
<SY> /x16 <U0016> SYNCHRONOUS IDLE (SYN)
|
||||
<ETB> /x17 <U0017> END OF TRANSMISSION BLOCK (ETB)
|
||||
<EB> /x17 <U0017> END OF TRANSMISSION BLOCK (ETB)
|
||||
<CAN> /x18 <U0018> CANCEL (CAN)
|
||||
@ -524,8 +524,8 @@ CHARMAP
|
||||
<o1> /xc7/xad <U01ed> LATIN SMALL LETTER O WITH OGONEK AND MACRON
|
||||
<EZ> /xc7/xae <U01ee> LATIN CAPITAL LETTER EZH WITH CARON
|
||||
<ez> /xc7/xaf <U01ef> LATIN SMALL LETTER EZH WITH CARON
|
||||
<G'> /xc7/xb8 <U01f8> LATIN CAPITAL LETTER G WITH ACUTE
|
||||
<g'> /xc7/xb9 <U01f9> LATIN SMALL LETTER G WITH ACUTE
|
||||
<G'> /xc7/xb4 <U01f4> LATIN CAPITAL LETTER G WITH ACUTE
|
||||
<g'> /xc7/xb5 <U01f5> LATIN SMALL LETTER G WITH ACUTE
|
||||
<AA'> /xc7/xba <U01fa> LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
|
||||
<aa'> /xc7/xbb <U01fb> LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE
|
||||
<AE'> /xc7/xbc <U01fc> LATIN CAPITAL LETTER AE WITH ACUTE
|
||||
@ -560,7 +560,7 @@ CHARMAP
|
||||
<;S> /xca/xbb <U02bb> MODIFIER LETTER TURNED COMMA
|
||||
<1/>> /xcb/x86 <U02c6> MODIFIER LETTER CIRCUMFLEX ACCENT
|
||||
<'<> /xcb/x87 <U02c7> CARON (Mandarin Chinese third tone)
|
||||
<1!> /xcb/x95 <U02d5> MODIFIER LETTER GRAVE ACCENT
|
||||
<1!> /xcb/x8b <U02cb> MODIFIER LETTER GRAVE ACCENT
|
||||
<'(> /xcb/x98 <U02d8> BREVE
|
||||
<'.> /xcb/x99 <U02d9> DOT ABOVE (Mandarin Chinese light tone)
|
||||
<'0> /xcb/x9a <U02da> RING ABOVE
|
||||
@ -581,7 +581,7 @@ CHARMAP
|
||||
<O%> /xce/x8c <U038c> GREEK CAPITAL LETTER OMICRON WITH TONOS
|
||||
<U%> /xce/x8e <U038e> GREEK CAPITAL LETTER UPSILON WITH TONOS
|
||||
<W%> /xce/x8f <U038f> GREEK CAPITAL LETTER OMEGA WITH TONOS
|
||||
<i3> /xce/x90 <U0390> GREEK SMALL LETTER IOTA WITH DIALYTICA AND TONOS
|
||||
<i3> /xce/x90 <U0390> GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
|
||||
<A*> /xce/x91 <U0391> GREEK CAPITAL LETTER ALPHA
|
||||
<B*> /xce/x92 <U0392> GREEK CAPITAL LETTER BETA
|
||||
<G*> /xce/x93 <U0393> GREEK CAPITAL LETTER GAMMA
|
||||
@ -1161,7 +1161,7 @@ CHARMAP
|
||||
<=s> /xe2/x82/x8c <U208c> SUBSCRIPT EQUALS SIGN
|
||||
<(s> /xe2/x82/x8d <U208d> SUBSCRIPT LEFT PARENTHESIS
|
||||
<)s> /xe2/x82/x8e <U208e> SUBSCRIPT RIGHT PARENTHESIS
|
||||
<Ff> /xe2/x82/xa3 <U20a3> FRENCH FRANK SIGN
|
||||
<Ff> /xe2/x82/xa3 <U20a3> FRENCH FRANC SIGN
|
||||
<Li> /xe2/x82/xa4 <U20a4> LIRA SIGN
|
||||
<Pt> /xe2/x82/xa7 <U20a7> PESETA SIGN
|
||||
<W=> /xe2/x82/xa9 <U20a9> WON SIGN
|
||||
@ -1546,7 +1546,7 @@ CHARMAP
|
||||
<RO> /xe2/x96/xa2 <U25a2> WHITE SQUARE WITH ROUNDED CORNERS
|
||||
<Rr> /xe2/x96/xa3 <U25a3> WHITE SQUARE CONTAINING BLACK SMALL SQUARE
|
||||
<RF> /xe2/x96/xa4 <U25a4> SQUARE WITH HORIZONTAL FILL
|
||||
<RY> /x00 SQUARE WITH VERTICAL FILL
|
||||
<RY> /xe2/x96/xa5 <U25a5> SQUARE WITH VERTICAL FILL
|
||||
<RH> /xe2/x96/xa6 <U25a6> SQUARE WITH ORTHOGONAL CROSSHATCH FILL
|
||||
<RZ> /xe2/x96/xa7 <U25a7> SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL
|
||||
<RK> /xe2/x96/xa8 <U25a8> SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL
|
||||
@ -1608,7 +1608,7 @@ CHARMAP
|
||||
<,_> /xe3/x80/x81 <U3001> IDEOGRAPHIC COMMA
|
||||
<._> /xe3/x80/x82 <U3002> IDEOGRAPHIC FULL STOP
|
||||
<+"> /xe3/x80/x83 <U3003> DITTO MARK
|
||||
<JIS> /xe3/x80/x84 <U3004> JAPANESE INDUSTRIAL STANDARD SIGN
|
||||
<JIS> /xe3/x80/x84 <U3004> JAPANESE INDUSTRIAL STANDARD SYMBOL
|
||||
<*_> /xe3/x80/x85 <U3005> IDEOGRAPHIC ITERATION MARK
|
||||
<;_> /xe3/x80/x86 <U3006> IDEOGRAPHIC CLOSING MARK
|
||||
<0_> /xe3/x80/x87 <U3007> IDEOGRAPHIC NUMBER ZERO
|
||||
@ -1829,7 +1829,7 @@ CHARMAP
|
||||
<fl> /xef/xac/x82 <Ufb02> LATIN SMALL LIGATURE FL
|
||||
<ffi> /xef/xac/x83 <Ufb03> LATIN SMALL LIGATURE FFI
|
||||
<ffl> /xef/xac/x84 <Ufb04> LATIN SMALL LIGATURE FFL
|
||||
<ft> /xef/xac/x85 <Ufb05> LATIN SMALL LIGATURE FT
|
||||
<ft> /xef/xac/x85 <Ufb05> LATIN SMALL LIGATURE LONG S T
|
||||
<st> /xef/xac/x86 <Ufb06> LATIN SMALL LIGATURE ST
|
||||
<3+;> /xef/xb9/xbd <Ufe7d> ARABIC SHADDA MEDIAL FORM
|
||||
<aM.> /xef/xba/x82 <Ufe82> ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
|
||||
|
@ -233,7 +233,7 @@ escape_char /
|
||||
<S3> <U008F> SINGLE-SHIFT THREE (SS3)
|
||||
<DC> <U0090> DEVICE CONTROL STRING (DCS)
|
||||
<P1> <U0091> PRIVATE USE ONE (PU1)
|
||||
<P2> <U0092> PRIVATE USE ONE (PU2)
|
||||
<P2> <U0092> PRIVATE USE TWO (PU2)
|
||||
<TS> <U0093> SET TRANSMIT STATE (STS)
|
||||
<CC> <U0094> CANCEL CHARACTER (CCH)
|
||||
<MW> <U0095> MESSAGE WAITING (MW)
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* @(#)pmap_clnt.c 2.2 88/08/01 4.0 RPCSRC */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
@ -27,21 +26,81 @@
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
#if !defined(lint) && defined(SCCSIDS)
|
||||
static char sccsid[] = "@(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (C) 1984, Sun Microsystems, Inc.
|
||||
*/
|
||||
/*
|
||||
* pmap_clnt.c
|
||||
* Client interface to pmap rpc service.
|
||||
*
|
||||
* Copyright (C) 1984, Sun Microsystems, Inc.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/pmap_prot.h>
|
||||
#include <rpc/pmap_clnt.h>
|
||||
|
||||
/*
|
||||
* Same as get_myaddress, but we try to use the loopback
|
||||
* interface. portmap caches interfaces, and on DHCP clients,
|
||||
* it could be that only loopback is started at this time.
|
||||
*/
|
||||
static void
|
||||
__get_myaddress (struct sockaddr_in *addr)
|
||||
{
|
||||
int s;
|
||||
char buf[BUFSIZ];
|
||||
struct ifconf ifc;
|
||||
struct ifreq ifreq, *ifr;
|
||||
int len, loopback = 1;
|
||||
|
||||
if ((s = __socket (AF_INET, SOCK_DGRAM, 0)) < 0)
|
||||
{
|
||||
perror ("__get_myaddress: socket");
|
||||
exit (1);
|
||||
}
|
||||
ifc.ifc_len = sizeof (buf);
|
||||
ifc.ifc_buf = buf;
|
||||
if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
|
||||
{
|
||||
perror (_("__get_myaddress: ioctl (get interface configuration)"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
again:
|
||||
ifr = ifc.ifc_req;
|
||||
for (len = ifc.ifc_len; len; len -= sizeof ifreq)
|
||||
{
|
||||
ifreq = *ifr;
|
||||
if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
|
||||
{
|
||||
perror ("__get_myaddress: ioctl");
|
||||
exit (1);
|
||||
}
|
||||
if ((ifreq.ifr_flags & IFF_UP) && (ifr->ifr_addr.sa_family == AF_INET)
|
||||
&& ((ifreq.ifr_flags & IFF_LOOPBACK) || (loopback == 0)))
|
||||
{
|
||||
*addr = *((struct sockaddr_in *) &ifr->ifr_addr);
|
||||
addr->sin_port = htons (PMAPPORT);
|
||||
__close (s);
|
||||
return;
|
||||
}
|
||||
ifr++;
|
||||
}
|
||||
if (loopback == 1)
|
||||
{
|
||||
loopback = 0;
|
||||
goto again;
|
||||
}
|
||||
__close (s);
|
||||
}
|
||||
|
||||
|
||||
static const struct timeval timeout = {5, 0};
|
||||
static const struct timeval tottimeout = {60, 0};
|
||||
|
||||
@ -58,7 +117,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
|
||||
struct pmap parms;
|
||||
bool_t rslt;
|
||||
|
||||
get_myaddress (&myaddress);
|
||||
__get_myaddress (&myaddress);
|
||||
client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS,
|
||||
timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
if (client == (CLIENT *) NULL)
|
||||
@ -92,7 +151,7 @@ pmap_unset (u_long program, u_long version)
|
||||
struct pmap parms;
|
||||
bool_t rslt;
|
||||
|
||||
get_myaddress (&myaddress);
|
||||
__get_myaddress (&myaddress);
|
||||
client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS,
|
||||
timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
if (client == (CLIENT *) NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user