]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
DARWIN sync: export VG_(socket).
authorNicholas Nethercote <njn@valgrind.org>
Fri, 22 May 2009 02:00:27 +0000 (02:00 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 22 May 2009 02:00:27 +0000 (02:00 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10098

coregrind/m_libcfile.c
coregrind/pub_core_libcfile.h

index 9c7e66497c68262a8bea42faea203faf47383575..50be7c00cb4ac8be68db13acf08eab1e9b096a63 100644 (file)
@@ -574,9 +574,6 @@ struct vki_sockaddr_in;
 static
 Int parse_inet_addr_and_port ( UChar* str, UInt* ip_addr, UShort* port );
 
-static
-Int my_socket ( Int domain, Int type, Int protocol );
-
 static
 Int my_connect ( Int sockfd, struct vki_sockaddr_in* serv_addr, Int addrlen );
 
@@ -655,7 +652,7 @@ Int VG_(connect_via_socket)( UChar* str )
    servAddr.sin_port = VG_(htons)(port);
 
    /* create socket */
-   sd = my_socket(VKI_AF_INET, VKI_SOCK_STREAM, 0 /* IPPROTO_IP ? */);
+   sd = VG_(socket)(VKI_AF_INET, VKI_SOCK_STREAM, 0 /* IPPROTO_IP ? */);
    if (sd < 0) {
       /* this shouldn't happen ... nevertheless */
       return -2;
@@ -723,8 +720,8 @@ static Int parse_inet_addr_and_port ( UChar* str, UInt* ip_addr, UShort* port )
 #  undef GET_CH
 }
 
-static
-Int my_socket ( Int domain, Int type, Int protocol )
+// GrP fixme safe_fd?
+Int VG_(socket) ( Int domain, Int type, Int protocol )
 {
 #  if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \
       || defined(VGP_ppc64_linux)
index 224c4722c4bcedf65c16f73fcd7ac22e24c06908..dbd4ca86956564ada73faf5cbc2f61c47c98281f 100644 (file)
@@ -63,6 +63,8 @@ extern UInt   VG_(ntohl) ( UInt x );
 extern UShort VG_(htons) ( UShort x );
 extern UShort VG_(ntohs) ( UShort x );
 
+extern Int VG_(socket) ( Int domain, Int type, Int protocol );
+
 extern Int VG_(write_socket)( Int sd, void *msg, Int count );
 extern Int VG_(getsockname) ( Int sd, struct vki_sockaddr *name, Int *namelen );
 extern Int VG_(getpeername) ( Int sd, struct vki_sockaddr *name, Int *namelen );