[xiph-cvs] cvs commit: net resolver.h sock.c sock.h
Brendan
brendan at xiph.org
Sun Jul 6 18:32:42 PDT 2003
brendan 03/07/06 21:32:42
Modified: . resolver.h sock.c sock.h
Log:
net gets the namespace deep cleansing treatment.
I suspect all this may be unnecessary, only because I've never heard of this
before. But then, I don't do much library work, and better safe than sorry.
Revision Changes Path
1.2 +7 -0 net/resolver.h
Index: resolver.h
===================================================================
RCS file: /usr/local/cvsroot/net/resolver.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -u -r1.1 -r1.2
--- resolver.h 10 Sep 2001 02:27:20 -0000 1.1
+++ resolver.h 7 Jul 2003 01:32:42 -0000 1.2
@@ -20,6 +20,13 @@
**
*/
+#ifdef _mangle
+# define resolver_initialize _mangle(resolver_initialize)
+# define resolver_shutdown _mangle(resolver_shutdown)
+# define resolver_getname _mangle(resolver_getname)
+# define resolver_getip _mangle(resolver_getip)
+#endif
+
void resolver_initialize(void);
void resolver_shutdown(void);
<p><p>1.32 +5 -2 net/sock.c
Index: sock.c
===================================================================
RCS file: /usr/local/cvsroot/net/sock.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -u -r1.31 -r1.32
--- sock.c 2 Jul 2003 21:29:08 -0000 1.31
+++ sock.c 7 Jul 2003 01:32:42 -0000 1.32
@@ -137,12 +137,15 @@ int sock_stalled (int error)
error == EALREADY;
}
-int sock_success (int error)
+#if 0
+/* what is this??? */
+static int sock_success (int error)
{
return error == 0;
}
+#endif
-int sock_connect_pending (int error)
+static int sock_connect_pending (int error)
{
return error == EINPROGRESS || error == EALREADY;
}
<p><p>1.16 +31 -3 net/sock.h
Index: sock.h
===================================================================
RCS file: /usr/local/cvsroot/net/sock.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -u -r1.15 -r1.16
--- sock.h 6 Jun 2003 00:05:18 -0000 1.15
+++ sock.h 7 Jul 2003 01:32:42 -0000 1.16
@@ -66,13 +66,41 @@ typedef int sock_t;
/* sock connect macro */
#define sock_connect(h, p) sock_connect_wto(h, p, 0)
+#ifdef _mangle
+# define sock_initialize _mangle(sock_initialize)
+# define sock_shutdown _mangle(sock_shutdown)
+# define sock_get_localip _mangle(sock_get_localip)
+# define sock_error _mangle(sock_error)
+# define sock_recoverable _mangle(sock_recoverable)
+# define sock_stalled _mangle(sock_stalled)
+# define sock_valid_socket _mangle(sock_valid_socket)
+# define sock_set_blocking _mangle(sock_set_blocking)
+# define sock_set_nolinger _mangle(sock_set_nolinger)
+# define sock_set_nodelay _mangle(sock_set_nodelay)
+# define sock_set_keepalive _mangle(sock_set_keepalive)
+# define sock_close _mangle(sock_close)
+# define sock_connect_wto _mangle(sock_connect_wto)
+# define sock_connect_non_blocking _mangle(sock_connect_non_blocking)
+# define sock_connected _mangle(sock_connected)
+# define sock_write_bytes _mangle(sock_write_bytes)
+# define sock_write _mangle(sock_write)
+# define sock_write_fmt _mangle(sock_write_fmt)
+# define sock_write_string _mangle(sock_write_string)
+# define sock_writev _mangle(sock_writev)
+# define sock_read_bytes _mangle(sock_read_bytes)
+# define sock_read_line _mangle(sock_read_line)
+# define sock_get_server_socket _mangle(sock_get_server_socket)
+# define sock_listen _mangle(sock_listen)
+# define sock_accept _mangle(sock_accept)
+#endif
+
/* Misc socket functions */
void sock_initialize(void);
void sock_shutdown(void);
char *sock_get_localip(char *buff, int len);
int sock_error(void);
int sock_recoverable(int error);
-int sock_stalled (int error);
+int sock_stalled(int error);
int sock_valid_socket(sock_t sock);
int sock_set_blocking(sock_t sock, const int block);
int sock_set_nolinger(sock_t sock);
@@ -82,8 +110,8 @@ int sock_close(sock_t sock);
/* Connection related socket functions */
sock_t sock_connect_wto(const char *hostname, const int port, const int timeout);
-int sock_connect_non_blocking (const char *host, const unsigned port);
-int sock_connected (int sock, unsigned timeout);
+int sock_connect_non_blocking(const char *host, const unsigned port);
+int sock_connected(int sock, unsigned timeout);
/* Socket write functions */
int sock_write_bytes(sock_t sock, const void *buff, const size_t len);
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list