DARWIN sync: export VG_(socket).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10098 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c
index 9c7e664..50be7c0 100644
--- a/coregrind/m_libcfile.c
+++ b/coregrind/m_libcfile.c
@@ -575,9 +575,6 @@
 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 );
 
 UInt VG_(htonl) ( UInt x )
@@ -655,7 +652,7 @@
    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 @@
 #  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)
diff --git a/coregrind/pub_core_libcfile.h b/coregrind/pub_core_libcfile.h
index 224c472..dbd4ca8 100644
--- a/coregrind/pub_core_libcfile.h
+++ b/coregrind/pub_core_libcfile.h
@@ -63,6 +63,8 @@
 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 );