From 03195be3881d80cf08556d14cb8366dd1e314d0d Mon Sep 17 00:00:00 2001 From: esevece Date: Tue, 19 Nov 2013 20:16:26 +0000 Subject: [PATCH] shl adapted to C (<<) git-svn-id: svn://kolibrios.org@4257 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../libraries/menuetlibc/include/menuet/net.h | 16 ++++++++-------- .../libraries/menuetlibc/src/libc/net/socket.c | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/programs/develop/libraries/menuetlibc/include/menuet/net.h b/programs/develop/libraries/menuetlibc/include/menuet/net.h index 5fb225369c..72b92cbf8e 100755 --- a/programs/develop/libraries/menuetlibc/include/menuet/net.h +++ b/programs/develop/libraries/menuetlibc/include/menuet/net.h @@ -27,7 +27,7 @@ extern "C" { #define SOCK_RAW 3 // Socket options -#define SO_NONBLOCK ((long)(1)) +#define SO_NONBLOCK 1 << 31 // IP protocols #define IPPROTO_IP 0 @@ -57,13 +57,13 @@ extern "C" { #define AI_SUPPORTED 0x40F // For system function 76 -#define API_ETH ((int)(0)) -#define API_IPv4 ((int)(1)) -#define API_ICMP ((int)(2)) -#define API_UDP ((int)(3)) -#define API_TCP ((int)(4)) -#define API_ARP ((int)(5)) -#define API_PPPOE ((int)(6)) +#define API_ETH 0 << 16 +#define API_IPv4 1 << 16 +#define API_ICMP 2 << 16 +#define API_UDP 3 << 16 +#define API_TCP 4 << 16 +#define API_ARP 5 << 16 +#define API_PPPOE 6 << 16 // Socket flags for user calls #define MSG_PEEK 0x02 diff --git a/programs/develop/libraries/menuetlibc/src/libc/net/socket.c b/programs/develop/libraries/menuetlibc/src/libc/net/socket.c index fd20fc6199..fa8fa43f80 100755 --- a/programs/develop/libraries/menuetlibc/src/libc/net/socket.c +++ b/programs/develop/libraries/menuetlibc/src/libc/net/socket.c @@ -47,8 +47,6 @@ int recv(int sockfd, void *buf, int len, int flags) return __ret; } - - // -------------------------------------------------------------- __u32 __menuet__open_UDP_socket(__u32 local_port,__u32 remote_port,__u32 remote_ip)