[pypy-svn] r18918 - pypy/dist/pypy/translator/c/src
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 25 12:26:41 CEST 2005
Author: arigo
Date: Tue Oct 25 12:26:41 2005
New Revision: 18918
Modified:
pypy/dist/pypy/translator/c/src/ll__socket.h
Log:
* Linux compabitibility
* 'addr2' undeclared? I suppose that 'addr' what meant here
Modified: pypy/dist/pypy/translator/c/src/ll__socket.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/ll__socket.h (original)
+++ pypy/dist/pypy/translator/c/src/ll__socket.h Tue Oct 25 12:26:41 2005
@@ -3,12 +3,16 @@
# pragma comment(lib, "ws2_32.lib")
#else
# include <arpa/inet.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <netdb.h>
#endif
int LL__socket_ntohs(int htons);
int LL__socket_htons(int ntohs);
long LL__socket_ntohl(long htonl);
long LL__socket_htonl(long ntohl);
+RPyString *LL__socket_gethostname(void);
struct RPyOpaque_ADDRINFO *LL__socket_getaddrinfo(RPyString *host, RPyString *port,
int family, int socktype,
int proto, int flags);
@@ -39,7 +43,7 @@
return htonl(ntohl);
}
-RPyString *LL__socket_gethostname()
+RPyString *LL__socket_gethostname(void)
{
char buf[1024];
int res;
@@ -121,12 +125,13 @@
ntohs(a->sin_port),0,0);
// XXX DECREF(canonname)
// XXX DECREF(ipaddr)
+ return ret;
}
}
void LL__socket_freeaddrinfo(struct RPyOpaque_ADDRINFO *addr)
{
freeaddrinfo(addr->info0);
- free(addr2);
+ free(addr);
}
#endif
More information about the Pypy-commit
mailing list