Merge pull request #2084 from amatus/push-upstream
Remove _-prefix from in6addr_*
This commit is contained in:
Коммит
dae556e5aa
|
@ -7354,20 +7354,10 @@ LibraryManager.library = {
|
|||
// netinet/in.h
|
||||
// ==========================================================================
|
||||
|
||||
_in6addr_any:
|
||||
in6addr_any:
|
||||
'allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC)',
|
||||
_in6addr_loopback:
|
||||
in6addr_loopback:
|
||||
'allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1], "i8", ALLOC_STATIC)',
|
||||
_in6addr_linklocal_allnodes:
|
||||
'allocate([255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1], "i8", ALLOC_STATIC)',
|
||||
_in6addr_linklocal_allrouters:
|
||||
'allocate([255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2], "i8", ALLOC_STATIC)',
|
||||
_in6addr_interfacelocal_allnodes:
|
||||
'allocate([255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1], "i8", ALLOC_STATIC)',
|
||||
_in6addr_interfacelocal_allrouters:
|
||||
'allocate([255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2], "i8", ALLOC_STATIC)',
|
||||
_in6addr_sitelocal_allrouters:
|
||||
'allocate([255,5,0,0,0,0,0,0,0,0,0,0,0,0,0,2], "i8", ALLOC_STATIC)',
|
||||
|
||||
// ==========================================================================
|
||||
// netdb.h
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#include <netinet/in.h>
|
||||
extern "C" int puts(const char *);
|
||||
int main() {
|
||||
struct in6_addr in6any = IN6ADDR_ANY_INIT;
|
||||
struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT;
|
||||
int i;
|
||||
for (i = 0; i < 16; ++i)
|
||||
if (in6any.s6_addr[i] != in6addr_any.s6_addr[i])
|
||||
return puts("in6addr_any != IN6ADDR_ANY_INIT\n");
|
||||
for (i = 0; i < 16; ++i)
|
||||
if (in6loopback.s6_addr[i] != in6addr_loopback.s6_addr[i])
|
||||
return puts("in6addr_loopback != IN6ADDR_LOOPBACK_INIT\n");
|
||||
return puts("pass");
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
pass
|
|
@ -4376,6 +4376,11 @@ PORT: 3979
|
|||
|
||||
self.do_run_from_file(src, output)
|
||||
|
||||
def test_netinet_in(self):
|
||||
src = open(path_from_root('tests', 'netinet', 'in.cpp'), 'r').read()
|
||||
expected = open(path_from_root('tests', 'netinet', 'in.out'), 'r').read()
|
||||
self.do_run(src, expected)
|
||||
|
||||
# libc++ tests
|
||||
|
||||
def test_iostream(self):
|
||||
|
|
Загрузка…
Ссылка в новой задаче