Parcourir la source

Fixed return type of send and recv.

woollybah il y a 6 ans
Parent
commit
08001b9589
2 fichiers modifiés avec 9 ajouts et 4 suppressions
  1. 7 2
      stdc.mod/stdc.bmx
  2. 2 2
      stdc.mod/stdc.c

+ 7 - 2
stdc.mod/stdc.bmx

@@ -328,9 +328,14 @@ Function connect_:Int( socket:Int, addrinfo:Byte Ptr )
 Function listen_:Int( socket:Int,backlog:Int )
 Function accept_:Int( socket:Int,addr:Byte Ptr,addr_len:Byte Ptr)
 Function select_:Int( n_read:Int,read_socks:Int Ptr,n_write:Int,write_socks:Int Ptr,n_except:Int,except_socks:Int Ptr,millis:Int )
-Function send_:Size_T( socket:Int,buf:Byte Ptr,size:Size_T,flags:Int )
 Function sendto_:Int( socket:Int,buf:Byte Ptr,size:Int,flags:Int,dest_ip:Byte Ptr,dest_port:Int, addr_type:Int = AF_INET_ )
-Function recv_:Size_T( socket:Int,buf:Byte Ptr,size:Size_T,flags:Int )
+?ptr64
+Function send_:Long( socket:Int,buf:Byte Ptr,size:Size_T,flags:Int )
+Function recv_:Long( socket:Int,buf:Byte Ptr,size:Size_T,flags:Int )
+?Not ptr64
+Function send_:Int( socket:Int,buf:Byte Ptr,size:Size_T,flags:Int )
+Function recv_:Int( socket:Int,buf:Byte Ptr,size:Size_T,flags:Int )
+?
 Function recvfrom_:Int( socket:Int,buf:Byte Ptr,size:Int,flags:Int,sender_ip:Int Var,sender_port:Int Var)
 Function setsockopt_:Int( socket:Int,level:Int,optname:Int,optval:Byte Ptr,count:Int)
 Function getsockopt_:Int( socket:Int,level:Int,optname:Int,optval:Byte Ptr,count:Int Var)

+ 2 - 2
stdc.mod/stdc.c

@@ -686,7 +686,7 @@ int select_( int n_read,int *r_socks,int n_write,int *w_socks,int n_except,int *
 	return r;
 }
 
-size_t send_( int socket,const char *buf,size_t size,int flags ){
+ssize_t send_( int socket,const char *buf,size_t size,int flags ){
 	return send( socket,buf,size,flags );
 }
 
@@ -717,7 +717,7 @@ int sendto_( int socket,const char *buf,int size,int flags,const char * dest_ip,
 	}
 }
 
-size_t recv_( int socket,char *buf,size_t size,int flags ){
+ssize_t recv_( int socket,char *buf,size_t size,int flags ){
 	return recv( socket,buf,size,flags );
 }