Skip to content

Commit 98696c3

Browse files
[libc] move src/network to src/arpa/inet
So that docgen can find our implementations. Fixes: #119272
1 parent a4e2927 commit 98696c3

File tree

22 files changed

+98
-96
lines changed

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
@@ -804,11 +804,11 @@ if(LLVM_LIBC_FULL_BUILD)
804804
libc.src.dirent.opendir
805805
libc.src.dirent.readdir
806806

807-
# network.h entrypoints
808-
libc.src.network.htonl
809-
libc.src.network.htons
810-
libc.src.network.ntohl
811-
libc.src.network.ntohs
807+
# arpa/inet.h entrypoints
808+
libc.src.arpa.inet.htonl
809+
libc.src.arpa.inet.htons
810+
libc.src.arpa.inet.ntohl
811+
libc.src.arpa.inet.ntohs
812812

813813
# pthread.h entrypoints
814814
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
@@ -747,11 +747,11 @@ if(LLVM_LIBC_FULL_BUILD)
747747
libc.src.dirent.opendir
748748
libc.src.dirent.readdir
749749

750-
# network.h entrypoints
751-
libc.src.network.htonl
752-
libc.src.network.htons
753-
libc.src.network.ntohl
754-
libc.src.network.ntohs
750+
# arpa/inet.h entrypoints
751+
libc.src.arpa.inet.htonl
752+
libc.src.arpa.inet.htons
753+
libc.src.arpa.inet.ntohl
754+
libc.src.arpa.inet.ntohs
755755

756756
# pthread.h entrypoints
757757
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
@@ -888,11 +888,11 @@ if(LLVM_LIBC_FULL_BUILD)
888888
libc.src.dirent.opendir
889889
libc.src.dirent.readdir
890890

891-
# network.h entrypoints
892-
libc.src.network.htonl
893-
libc.src.network.htons
894-
libc.src.network.ntohl
895-
libc.src.network.ntohs
891+
# arpa/inet.h entrypoints
892+
libc.src.arpa.inet.htonl
893+
libc.src.arpa.inet.htons
894+
libc.src.arpa.inet.ntohl
895+
libc.src.arpa.inet.ntohs
896896

897897
# pthread.h entrypoints
898898
libc.src.pthread.pthread_atfork

libc/src/CMakeLists.txt

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

36+
add_subdirectory(arpa)
3637
add_subdirectory(assert)
3738
add_subdirectory(compiler)
38-
add_subdirectory(network)
39+
add_subdirectory(locale)
3940
add_subdirectory(search)
4041
add_subdirectory(setjmp)
4142
add_subdirectory(signal)
4243
add_subdirectory(spawn)
4344
add_subdirectory(threads)
44-
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)