Skip to content

Commit 1d7d005

Browse files
[libc] move src/network to src/arpa/inet (#119273)
So that docgen can find our implementations. Fixes: #119272
1 parent 431ea2d commit 1d7d005

22 files changed

+98
-96
lines changed

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,11 +811,11 @@ if(LLVM_LIBC_FULL_BUILD)
811811
libc.src.dirent.opendir
812812
libc.src.dirent.readdir
813813

814-
# network.h entrypoints
815-
libc.src.network.htonl
816-
libc.src.network.htons
817-
libc.src.network.ntohl
818-
libc.src.network.ntohs
814+
# arpa/inet.h entrypoints
815+
libc.src.arpa.inet.htonl
816+
libc.src.arpa.inet.htons
817+
libc.src.arpa.inet.ntohl
818+
libc.src.arpa.inet.ntohs
819819

820820
# pthread.h entrypoints
821821
libc.src.pthread.pthread_atfork

libc/config/linux/riscv/entrypoints.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -752,11 +752,11 @@ if(LLVM_LIBC_FULL_BUILD)
752752
libc.src.dirent.opendir
753753
libc.src.dirent.readdir
754754

755-
# network.h entrypoints
756-
libc.src.network.htonl
757-
libc.src.network.htons
758-
libc.src.network.ntohl
759-
libc.src.network.ntohs
755+
# arpa/inet.h entrypoints
756+
libc.src.arpa.inet.htonl
757+
libc.src.arpa.inet.htons
758+
libc.src.arpa.inet.ntohl
759+
libc.src.arpa.inet.ntohs
760760

761761
# pthread.h entrypoints
762762
libc.src.pthread.pthread_atfork

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -895,11 +895,11 @@ if(LLVM_LIBC_FULL_BUILD)
895895
libc.src.dirent.opendir
896896
libc.src.dirent.readdir
897897

898-
# network.h entrypoints
899-
libc.src.network.htonl
900-
libc.src.network.htons
901-
libc.src.network.ntohl
902-
libc.src.network.ntohs
898+
# arpa/inet.h entrypoints
899+
libc.src.arpa.inet.htonl
900+
libc.src.arpa.inet.htons
901+
libc.src.arpa.inet.ntohl
902+
libc.src.arpa.inet.ntohs
903903

904904
# pthread.h entrypoints
905905
libc.src.pthread.pthread_atfork

libc/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ if(NOT LLVM_LIBC_FULL_BUILD)
3434
return()
3535
endif()
3636

37+
add_subdirectory(arpa)
3738
add_subdirectory(assert)
3839
add_subdirectory(compiler)
39-
add_subdirectory(network)
40+
add_subdirectory(locale)
4041
add_subdirectory(search)
4142
add_subdirectory(setjmp)
4243
add_subdirectory(signal)
4344
add_subdirectory(spawn)
4445
add_subdirectory(threads)
45-
add_subdirectory(locale)

libc/src/arpa/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_subdirectory(inet)
File renamed without changes.

libc/src/network/htonl.cpp renamed to libc/src/arpa/inet/htonl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "src/network/htonl.h"
9+
#include "src/arpa/inet/htonl.h"
1010
#include "src/__support/common.h"
1111
#include "src/__support/endian_internal.h"
1212
#include "src/__support/macros/config.h"

libc/src/network/htonl.h renamed to libc/src/arpa/inet/htonl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef LLVM_LIBC_SRC_NETWORK_HTONL_H
10-
#define LLVM_LIBC_SRC_NETWORK_HTONL_H
9+
#ifndef LLVM_LIBC_SRC_ARPA_INET_HTONL_H
10+
#define LLVM_LIBC_SRC_ARPA_INET_HTONL_H
1111

1212
#include "src/__support/macros/config.h"
1313
#include <stdint.h>
@@ -18,4 +18,4 @@ uint32_t htonl(uint32_t hostlong);
1818

1919
} // namespace LIBC_NAMESPACE_DECL
2020

21-
#endif // LLVM_LIBC_SRC_NETWORK_HTONL_H
21+
#endif // LLVM_LIBC_SRC_ARPA_INET_HTONL_H

libc/src/network/htons.cpp renamed to libc/src/arpa/inet/htons.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "src/network/htons.h"
9+
#include "src/arpa/inet/htons.h"
1010
#include "src/__support/common.h"
1111
#include "src/__support/endian_internal.h"
1212
#include "src/__support/macros/config.h"

libc/src/network/htons.h renamed to libc/src/arpa/inet/htons.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef LLVM_LIBC_SRC_NETWORK_HTONS_H
10-
#define LLVM_LIBC_SRC_NETWORK_HTONS_H
9+
#ifndef LLVM_LIBC_SRC_ARPA_INET_HTONS_H
10+
#define LLVM_LIBC_SRC_ARPA_INET_HTONS_H
1111

1212
#include "src/__support/macros/config.h"
1313
#include <stdint.h>
@@ -18,4 +18,4 @@ uint16_t htons(uint16_t hostshort);
1818

1919
} // namespace LIBC_NAMESPACE_DECL
2020

21-
#endif // LLVM_LIBC_SRC_NETWORK_HTONS_H
21+
#endif // LLVM_LIBC_SRC_ARPA_INET_HTONS_H

0 commit comments

Comments
 (0)