INFO: XFree86-doc.spec
Arkadiusz Miśkiewicz
misiek w zsz2.starachowice.pl
Czw, 3 Gru 1998, 12:32:31 CET
[czwartek, 03 grudzień 1998], Wojciech Sas Cieciwa napisał(a):
>
> Ok.
> Skoro niegdzie właściwie nie ma dokumentacji do X-ów :))
> To właśnie zrobiłem małego SPECa z dokumentacją.
>
> Jest w nim to co w orginale siedzi w X333ser-3.tgz
> lokalizacja -> /usr/doc/XFree86/...
Ja znów znalazłem:
XFree86-3.2-ipv6-diff#3
w attachu,
>
> Pozdrawiam.
> Sas.
> =============================================================================
> UNIX System Administrator, POLAND
> _/_/_/_/ _/_/_/_/ _/_/_/_/ Wojciech 'Sas' Cieciwa
> _/ _/ _/ _/
> _/_/_/_/ _/_/_/_/ _/_/_/_/ cieciwa w alpha.zarz.agh.edu.pl
> _/ _/ _/ _/ sas w uci.agh.edu.pl
> _/_/_/_/ _/ _/ _/_/_/_/
> http://www2.zarz.agh.edu.pl/~cieciwa
>
> Summary: XFree86 Programmers documentation
> Summary(pl): XFree86 Dokumentacja dla programistów
> Name: XFree86-documetation
> Version: 3.3.3
> Release: 1
> Copyright: GPL
> Group: X11
> Source: ftp://ftp.xfree86.org/pub/XFree86/3.3.3/source/X333src-3.tgz
> Buildarch: noarch
> Buildroot: /tmp/%{name}-%{version}-root
>
> %description
> Basic programmers documentation, many information about X-Window programming.
> In compressed PostScript format.
>
> %description -l pl
> Pakiet zawiera większość informacji niezbędnych to rozpoczęcia programowania
> _pod_ X-y.
> Format: zkompresowany PostScript
>
> %prep
> %setup -q -c
> %build
>
> %install
> install -d $RPM_BUILD_ROOT/usr/doc/XFree86/
> cd xc/doc/hardcopy
> tar cf - . | (cd $RPM_BUILD_ROOT/usr/doc/XFree86/; tar xf -)
>
> %clean
> rm -rf $RPM_BUILD_ROOT
> rm -rf $RPM_BUILD_DIR/%name-%version
>
> %files
> %defattr(644, root, root, 755)
> /usr/doc/XFree86/*
>
> %changelog
> * Thu Dec 03 1998 Wojciech "Sas" Cięciwa <cieciwa w alpha.zarz.agh.edu.pl
> - separate documetation from main package.
>
> * Tue Dec 01 1998 Wojciech "Sas" Cięciwa <cieciwa w alpha.zarz.agh.edu.pl>
> - building RPM.
--
+- Arkadiusz Miśkiewicz - Cron w irc.pl on #plug - misiek w misiek.eu.org -+
+ http://www.misiek.eu.org --- Poland --- SysAdm: zsz2.starachowice.pl +
+ Polish Linux Distribution Team Member - http://www.shadow.eu.org/PLD +
-------------- następna część ---------
diff -u --recursive XFree86-3.2/xc/config/cf/linux.cf XFree86-3.2-with-ipv6/xc/config/cf/linux.cf
--- XFree86-3.2/xc/config/cf/linux.cf Sun Feb 9 17:01:03 1997
+++ XFree86-3.2-with-ipv6/xc/config/cf/linux.cf Mon Feb 10 16:58:51 1997
@@ -201,7 +201,7 @@
#else
#define ServerExtraSysLibs /**/
#endif
-#define ConnectionFlags -DUNIXCONN -DTCPCONN
+#define ConnectionFlags -DUNIXCONN -DTCPCONN -DINET6
/* Some of these man page defaults are overriden in the above OS sections */
#ifndef ManSuffix
diff -u --recursive XFree86-3.2/xc/lib/xtrans/Xtranssock.c XFree86-3.2-with-ipv6/xc/lib/xtrans/Xtranssock.c
--- XFree86-3.2/xc/lib/xtrans/Xtranssock.c Sun Feb 9 17:03:02 1997
+++ XFree86-3.2-with-ipv6/xc/lib/xtrans/Xtranssock.c Wed Feb 12 16:36:06 1997
@@ -161,6 +161,11 @@
#define SocketInitOnce() /**/
#endif
+#ifdef INET6
+#include <netinet6/in6.h>
+#include "support.h"
+#endif
+
#define MIN_BACKLOG 128
#ifdef SOMAXCONN
#if SOMAXCONN > MIN_BACKLOG
@@ -188,8 +193,13 @@
static Sockettrans2dev Sockettrans2devtab[] = {
#ifdef TCPCONN
+#ifdef INET6
+ {"inet",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
+ {"tcp",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
+#else
{"inet",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
{"tcp",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
+#endif /* INET6 */
#endif /* TCPCONN */
#ifdef UNIXCONN
{"unix",AF_UNIX,SOCK_STREAM,SOCK_DGRAM,0},
@@ -292,7 +302,7 @@
XtransConnInfo ciptr;
{
- struct sockaddr_in sockname;
+ struct sockaddr sockname;
int namelen = sizeof sockname;
PRMSG (3,"SocketINETGetAddr(%x)\n", ciptr, 0, 0);
@@ -316,7 +326,7 @@
return -1;
}
- ciptr->family = sockname.sin_family;
+ ciptr->family = sockname.sa_family;
ciptr->addrlen = namelen;
memcpy (ciptr->addr, &sockname, ciptr->addrlen);
@@ -335,7 +345,7 @@
XtransConnInfo ciptr;
{
- struct sockaddr_in sockname;
+ struct sockaddr sockname;
int namelen = sizeof(sockname);
PRMSG (3,"SocketINETGetPeerAddr(%x)\n", ciptr, 0, 0);
@@ -384,6 +394,7 @@
return NULL;
}
+try_again:
if ((ciptr->fd = socket(Sockettrans2devtab[i].family, type,
Sockettrans2devtab[i].protocol)) < 0
#ifndef WIN32
@@ -392,6 +403,14 @@
#endif
#endif
) {
+#ifdef INET6
+ if (errno == EPFNOSUPPORT &&
+ Sockettrans2devtab[i].family == AF_INET6) {
+ /* This must be an IPv4-only machine */
+ Sockettrans2devtab[i].family = AF_INET;
+ goto try_again;
+ }
+#endif
PRMSG (1, "SocketOpen: socket() failed for %s\n",
Sockettrans2devtab[i].transname, 0, 0);
@@ -400,7 +419,11 @@
}
#ifdef TCP_NODELAY
- if (Sockettrans2devtab[i].family == AF_INET)
+ if (Sockettrans2devtab[i].family == AF_INET
+#ifdef INET6
+ || Sockettrans2devtab[i].family == AF_INET6
+#endif
+ )
{
/*
* turn off TCP coalescence for INET sockets
@@ -536,10 +559,14 @@
#ifdef SO_REUSEADDR
/*
- * SO_REUSEADDR only applied to AF_INET
+ * SO_REUSEADDR only applied to AF_INET or AF_INET6
*/
- if (Sockettrans2devtab[i].family == AF_INET)
+ if (Sockettrans2devtab[i].family == AF_INET
+#ifdef INET6
+ || Sockettrans2devtab[i].family == AF_INET6
+#endif
+ )
{
int one = 1;
setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR,
@@ -760,7 +787,11 @@
PRMSG (3, "SocketCreateListener(%x,%d)\n", ciptr, fd, 0);
- if (Sockettrans2devtab[ciptr->index].family == AF_INET)
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET
+#ifdef INET6
+ || Sockettrans2devtab[ciptr->index].family == AF_INET6
+#endif
+ )
retry = 20;
else
retry = 0;
@@ -783,7 +814,11 @@
#endif /* SO_REUSEDADDR */
}
- if (Sockettrans2devtab[ciptr->index].family == AF_INET) {
+ if (Sockettrans2devtab[ciptr->index].family == AF_INET
+#ifdef INET6
+ || Sockettrans2devtab[ciptr->index].family == AF_INET6
+#endif
+ ) {
#ifdef SO_DONTLINGER
setsockopt (fd, SOL_SOCKET, SO_DONTLINGER, (char *) NULL, 0);
#else
@@ -820,10 +855,16 @@
char *port;
{
- struct sockaddr_in sockname;
+#ifdef INET6
+ struct sockaddr_in6 sockname;
+ struct sockaddr_in *sockname4 = (struct sockaddr_in *)&sockname;
+#else
+ struct sockaddr_in sockname;
+#endif
int namelen = sizeof(sockname);
int status;
short tmpport;
+ short listenport;
#if defined(XTHREADS) && defined(XUSE_MTSAFE_API)
#ifdef _POSIX_REENTRANT_FUNCTIONS
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
@@ -902,22 +943,39 @@
port, 0, 0);
return TRANS_CREATE_LISTENER_FAILED;
}
- sockname.sin_port = ServPort;
+ listenport = ServPort;
}
else
{
tmpport = (short) atoi (port);
- sockname.sin_port = htons (tmpport);
+ listenport = htons (tmpport);
}
}
else
- sockname.sin_port = htons (0);
+ listenport = htons (0);
+#ifdef INET6
+ sockname.sin6_family = Sockettrans2devtab[ciptr->index].family;
+ sockname.sin6_port = listenport;
+ switch (sockname.sin6_family) {
+ case AF_INET6:
+ memset(sockname.sin6_addr.in6_u.u6_addr8, 0, 16);
+ break;
+ case AF_INET:
+ sockname4->sin_addr.s_addr = htonl (INADDR_ANY);
+#ifdef BSD44SOCKETS
+ sockname4->sin_len = sizeof (sockname);
+#endif
+ break;
+ }
+#else
#ifdef BSD44SOCKETS
sockname.sin_len = sizeof (sockname);
#endif
- sockname.sin_family = AF_INET;
+ sockname.sin_port = listenport;
+ sockname.sin_family = Sockettrans2devtab[ciptr->index].family;
sockname.sin_addr.s_addr = htonl (INADDR_ANY);
+#endif /* INET6 */
if ((status = TRANS(SocketCreateListener) (ciptr,
(struct sockaddr *) &sockname, namelen)) < 0)
@@ -1101,7 +1159,11 @@
{
XtransConnInfo newciptr;
+#ifdef INET6
+ struct sockaddr_in6 sockname;
+#else
struct sockaddr_in sockname;
+#endif
int namelen = sizeof(sockname);
PRMSG (2, "SocketINETAccept(%x,%d)\n", ciptr, ciptr->fd, 0);
@@ -1260,8 +1322,14 @@
char *port;
{
+#ifdef INET6
+ struct addrinfo req, *ai, *ai2;
+ char buf1[46], buf2[16];
+ int s;
+#else
struct sockaddr_in sockname;
int namelen = sizeof(sockname);
+#endif
#if defined(XTHREADS) && defined(XUSE_MTSAFE_API)
#ifdef _POSIX_REENTRANT_FUNCTIONS
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
@@ -1350,18 +1418,68 @@
strncpy (portbuf, port, PORTBUFSIZE);
/*
- * Build the socket name.
+ * fill in sin_addr
*/
-#ifdef BSD44SOCKETS
- sockname.sin_len = sizeof (struct sockaddr_in);
+#ifdef INET6
+
+ memset(&req, 0, sizeof(struct addrinfo));
+ req.ai_socktype = SOCK_STREAM;
+ req.ai_flags |= AI_CANONNAME;
+
+ if (s = getaddrinfo(host, portbuf, &req, &ai)) {
+ PRMSG (4,"SocketINETConnect: getaddrinfo: %s: %s\n",
+ host, gai_strerror(s), 0);
+ return TRANS_CONNECT_FAILED;
+ }
+
+ {
+ int ok = 0;
+
+ for (ai2 = ai, s = -1; ai; ai = ai->ai_next) {
+
+ if (getnameinfo(ai->ai_addr, ai->ai_addrlen, buf1, sizeof(buf1), buf2, sizeof(buf2), 0)) {
+ PRMSG(4,"SocketINETConnect: getnameinfo() failed!\n", 0, 0, 0);
+ continue;
+ }
+
+ if (ciptr->family != ai->ai_family) {
+ close(ciptr->fd);
+ ciptr->fd = socket(ai->ai_family, SOCK_STREAM, Sockettrans2devtab[ciptr->index].protocol);
+ ciptr->family = ai->ai_family;
+ if (ciptr->fd < 0) continue;
+ }
+
+ if (connect (ciptr->fd, ai->ai_addr, ai->ai_addrlen) < 0)
+ {
+#ifdef WIN32
+ int olderrno = WSAGetLastError();
+#else
+ int olderrno = errno;
#endif
- sockname.sin_family = AF_INET;
+
+ PRMSG (1,"SocketINETConnect: Can't connect: errno = %d\n",
+ EGET(),0, 0);
+ continue;
+ }
+ ok = 1;
+ break;
+ }
+ if (!ok)
+ return TRANS_CONNECT_FAILED;
+ }
+
+#else /* ! INET6 */
/*
- * fill in sin_addr
+ * Build the socket name.
*/
+#ifdef BSD44SOCKETS
+ sockname.sin_len = sizeof (struct sockaddr_in);
+#endif /* BSD44SOCKETS */
+ sockname.sin_family = AF_INET;
+
/* check for ww.xx.yy.zz host string */
if (isascii (host[0]) && isdigit (host[0])) {
@@ -1472,7 +1590,8 @@
else
return TRANS_CONNECT_FAILED;
}
-
+
+#endif /* INET6 */
/*
* Sync up the address fields of ciptr.
diff -u --recursive XFree86-3.2/xc/lib/xtrans/Xtransutil.c XFree86-3.2-with-ipv6/xc/lib/xtrans/Xtransutil.c
--- XFree86-3.2/xc/lib/xtrans/Xtransutil.c Sun Feb 9 17:03:03 1997
+++ XFree86-3.2-with-ipv6/xc/lib/xtrans/Xtransutil.c Sun Feb 9 17:20:04 1997
@@ -99,6 +99,46 @@
switch( *familyp )
{
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
+#ifdef INET6
+ case AF_INET6:
+ {
+ /*
+ * Check for the BSD hack localhost address ::1.
+ * In this case, we are really FamilyLocal.
+ */
+
+ struct sockaddr_in6 saddr;
+#ifdef CRAY
+#ifdef OLDTCP
+ int len = sizeof(saddr.sin6_addr);
+#else
+ int len = SIZEOF_in_addr;
+#endif /* OLDTCP */
+ char *cp = (char *) &saddr.sin6_addr;
+#else /* else not CRAY */
+ int len = sizeof(saddr.sin6_addr.in6_u);
+ char *cp = (char *) &saddr.sin6_addr.in6_u.u6_addr8[0];
+#endif /* CRAY */
+
+ memcpy (&saddr, *addrp, sizeof (struct sockaddr_in6));
+
+ if ((len == 16) &&
+ (cp[0] == 0) && (cp[1] == 0) && (cp[2] == 0) && (cp[3] == 0) &&
+ (cp[4] == 0) && (cp[5] == 0) && (cp[6] == 0) && (cp[7] == 0) &&
+ (cp[8] == 0) && (cp[9] == 0) && (cp[10] == 0) && (cp[11] == 0) &&
+ (cp[12] == 0) && (cp[13] == 0) && (cp[14] == 0) && (cp[15] == 1))
+ {
+ *familyp=FamilyLocal;
+ }
+ else
+ {
+ *familyp=FamilyInternet;
+ *addrlenp=len;
+ memcpy(*addrp,&saddr.sin6_addr,len);
+ }
+ break;
+ }
+#endif
case AF_INET:
{
/*
@@ -454,9 +494,9 @@
#endif
default:
+ fprintf(stderr, "Can't get peer info for unknown family %d\n", family);
return (NULL);
}
-
hostname = (char *) xalloc (
strlen (ciptr->transptr->TransName) + strlen (addr) + 2);
diff -u --recursive XFree86-3.2/xc/programs/Xserver/os/connection.c XFree86-3.2-with-ipv6/xc/programs/Xserver/os/connection.c
--- XFree86-3.2/xc/programs/Xserver/os/connection.c Sun Feb 9 17:02:29 1997
+++ XFree86-3.2-with-ipv6/xc/programs/Xserver/os/connection.c Sun Feb 9 16:55:43 1997
@@ -113,6 +113,9 @@
# endif
# endif
# endif
+# ifdef INET6
+# include <netinet6/in6.h>
+# endif
#endif
#ifdef AMTCPCONN
@@ -448,6 +451,14 @@
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr),
((struct sockaddr_in *) saddr)->sin_port);
break;
+#ifdef INET6
+ case AF_INET6:
+ sprintf(addr, "IPv6 %s port %d",
+ inet_ntop(AF_INET6, &((struct sockaddr_in6 *)saddr)->
+ sin6_addr, NULL, 0),
+ ntohs(((struct sockaddr_in6 *)saddr)->sin6_port));
+ break;
+#endif
#endif
#ifdef DNETCONN
case AF_DECnet:
-------------- następna część ---------
Załącznik, który nie był tekstem został usunięty...
Name: nie znany
Type: application/pgp-signature
Size: 248 bytes
Desc: nie znany
Url : /mailman/pipermail/pld-devel-pl/attachments/19981203/eee3cd91/attachment.bin
Więcej informacji o liście dyskusyjnej pld-devel-pl