There is nothing forcing the current functions in fl_socket from being in f_socket.
build_linker ar
build_libraries -lc
build_libraries-level
-build_sources_library console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c memory.c path.c pipe.c print.c utf.c private-utf.c
+build_sources_library console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c memory.c path.c pipe.c print.c socket.c utf.c private-utf.c
build_sources_program
build_sources_headers color.h console.h conversion.h directory.h directory_type.h environment.h file.h fss.h memory.h path.h pipe.h print.h serialized.h socket.h status.h status_array.h string.h type.h type_array.h utf.h
build_sources_script
build_linker ar
build_libraries -lc
build_libraries-level -lfll_0
-build_sources_library color.c console.c directory.c private-directory.c fss.c fss_basic.c fss_basic_list.c fss_extended.c fss_extended_list.c print.c serialized.c private-serialized.c socket.c status.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c
+build_sources_library color.c console.c directory.c private-directory.c fss.c fss_basic.c fss_basic_list.c fss_extended.c fss_extended_list.c print.c serialized.c private-serialized.c status.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c
build_sources_program
-build_sources_headers color.h console.h directory.h fss.h fss_basic.h fss_basic_list.h fss_extended.h fss_extended_list.h fss_macro.h fss_status.h print.h serialized.h socket.h status.h string.h utf.h utf_file.h
+build_sources_headers color.h console.h directory.h fss.h fss_basic.h fss_basic_list.h fss_extended.h fss_extended_list.h fss_macro.h fss_status.h print.h serialized.h status.h string.h utf.h utf_file.h
build_sources_script
build_sources_setting
build_script yes
build_linker ar
build_libraries -lc
build_libraries-monolithic
-build_sources_library level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/memory.c level_0/path.c level_0/pipe.c level_0/print.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/directory.c level_1/private-directory.c level_1/fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/print.c level_1/serialized.c level_1/private-serialized.c level_1/socket.c level_1/status.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/directory.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/program.c level_2/status.c
+build_sources_library level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/memory.c level_0/path.c level_0/pipe.c level_0/print.c level_0/socket.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/directory.c level_1/private-directory.c level_1/fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/print.c level_1/serialized.c level_1/private-serialized.c level_1/status.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/directory.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/program.c level_2/status.c
build_sources_program
-build_sources_headers level_0/color.h level_0/console.h level_0/conversion.h level_0/directory.h level_0/directory_type.h level_0/environment.h level_0/file.h level_0/fss.h level_0/memory.h level_0/path.h level_0/pipe.h level_0/print.h level_0/serialized.h level_0/socket.h level_0/status.h level_0/status_array.h level_0/string.h level_0/type.h level_0/type_array.h level_0/utf.h level_1/color.h level_1/console.h level_1/directory.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_macro.h level_1/fss_status.h level_1/print.h level_1/serialized.h level_1/socket.h level_1/status.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/directory.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/program.h level_2/status.h
+build_sources_headers level_0/color.h level_0/console.h level_0/conversion.h level_0/directory.h level_0/directory_type.h level_0/environment.h level_0/file.h level_0/fss.h level_0/memory.h level_0/path.h level_0/pipe.h level_0/print.h level_0/serialized.h level_0/socket.h level_0/status.h level_0/status_array.h level_0/string.h level_0/type.h level_0/type_array.h level_0/utf.h level_1/color.h level_1/console.h level_1/directory.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_macro.h level_1/fss_status.h level_1/print.h level_1/serialized.h level_1/status.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/directory.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/program.h level_2/status.h
build_sources_script
build_sources_setting
build_script yes
bash build/scripts/package.sh build -i
if [[ $? -eq 0 ]] ; then
- for i in f_type f_status f_memory f_string f_utf f_color f_console f_conversion f_directory f_environment f_file f_fss f_path f_pipe f_print f_serialized f_socket fl_color fl_console fl_directory fl_fss fl_print fl_serialized fl_socket fl_status fl_string fl_utf fl_utf_file fll_directory fll_execute fll_file fll_fss fll_program fll_status ; do
+ for i in f_type f_status f_memory f_string f_utf f_color f_console f_conversion f_directory f_environment f_file f_fss f_path f_pipe f_print f_serialized f_socket fl_color fl_console fl_directory fl_fss fl_print fl_serialized fl_status fl_string fl_utf fl_utf_file fll_directory fll_execute fll_file fll_fss fll_program fll_status ; do
+ echo && echo "Processing $i." &&
+
cd package/individual/$i-$2/ &&
./bootstrap.sh clean &&
-#include <level_1/socket.h>
+#include <level_0/socket.h>
#ifdef __cplusplus
extern "C"{
#endif
-#ifndef _di_fl_socket_file_bind_
- f_return_status fl_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address) {
+#ifndef _di_f_socket_file_bind_
+ f_return_status f_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address) {
memset(&address, 0, sizeof(struct sockaddr_un));
address->sun_family = AF_UNIX;
strncpy(address->sun_path, path, sizeof(address->sun_path) - 1);
return F_none;
}
-#endif // _di_fl_socket_file_bind_
+#endif // _di_f_socket_file_bind_
-#ifndef _di_fl_socket_listen_
- f_return_status fl_socket_listen(const int id, const unsigned int max_backlog) {
+#ifndef _di_f_socket_listen_
+ f_return_status f_socket_listen(const int id, const unsigned int max_backlog) {
if (listen(id, max_backlog) < 0) {
if (errno == EADDRINUSE) return F_status_set_error(F_busy_address);
return F_none;
}
-#endif // _di_fl_socket_listen_
+#endif // _di_f_socket_listen_
-#ifndef _di_fl_socket_close_client_
- f_return_status fl_socket_close_client(const int id, const unsigned short action) {
+#ifndef _di_f_socket_close_client_
+ f_return_status f_socket_close_client(const int id, const unsigned short action) {
unsigned int error_code = 0;
if (action == f_socket_close_fast) {
return F_none;
}
-#endif // _di_fl_socket_close_client_
+#endif // _di_f_socket_close_client_
#ifdef __cplusplus
} // extern "C"
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <unistd.h>
+
// fll-0 includes
+#include <level_0/type.h>
#include <level_0/status.h>
#include <level_0/string.h>
-#include <level_0/type.h>
#ifdef __cplusplus
extern "C"{
};
#endif // _di_f_socket_types_
+/**
+ * Bind a UNIX socket.
+ *
+ * @param path
+ * The path to a socket file to bind to.
+ * @param id
+ * The ID of a socket.
+ * @param address
+ * The socket address information.
+ *
+ * @return
+ * F_none on success.
+ * F_address (with error bit) if address is already in use (therefore unavailable).
+ * F_buffer (with error bit) if the buffer is invalid.
+ * F_busy_address (with error bit) if address is already in use (therefore unavailable).
+ * F_busy_socket (with error bit) if socket defined by id is already bound (therefore unavailable).
+ * F_descriptor (with error bit) if the id is not a socket descriptor.
+ * F_directory_found_not (with error bit) if directory was not found.
+ * F_file_found_not (with error bit) if file not found.
+ * F_memory_out (with error bit) if out of memory.
+ * F_name (with error bit) on path name error.
+ * F_string_too_large (with error bit) if string is too large to store in the buffer.
+ * F_unavailable_address (with error bit) if address is unavailable (is non-existent or not local).
+ *
+ * @see bind()
+ */
+#ifndef _di_f_socket_file_bind_
+ extern f_return_status f_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address);
+#endif // _di_f_socket_file_bind_
+
+/**
+ * Terminate a socket connection.
+ *
+ * @param id
+ * The ID of a socket.
+ * @param max_backlog
+ * The max length of the pending connections queue.
+ * Suggested default setting: 8.
+ *
+ * @return
+ * F_none on success.
+ * F_busy_address (with error bit) if address is already in use (therefore unavailable).
+ * F_descriptor (with error bit) if the id is not a socket descriptor.
+ * F_file_descriptor (with error bit) if id is an invalid descriptor.
+ * F_unsupported (with error bit) if this socket does not support the listen() operation.
+ *
+ * @see listen()
+ */
+#ifndef _di_f_socket_listen_
+ extern f_return_status f_socket_listen(const int id, const unsigned int max_backlog);
+#endif // _di_f_socket_listen_
+
+/**
+ * Terminate a client socket connection.
+ *
+ * @param id
+ * The ID of a socket.
+ * @param action
+ * The action to perform on close.
+ * f_socket_close_fast calls close().
+ *
+ * @return
+ * F_none on success.
+ * F_connected_not if the socket is not connected.
+ * F_busy_address (with error bit) if address is already in use (therefore unavailable).
+ * F_descriptor (with error bit) if the id is not a socket descriptor.
+ * F_file_descriptor (with error bit) if id is an invalid descriptor.
+ * F_filesystem_quota_block (with error bit) if filesystem's disk blocks or inodes are exhausted.
+ * F_input_output (with error bit) if an I/O error occurred.
+ * F_interrupted (with error bit) when program received an interrupt signal, halting operation.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
+ * F_unsupported (with error bit) if this socket does not support the listen() operation.
+ *
+ * @see close()
+ * @see shutdown()
+ */
+#ifndef _di_f_socket_close_client_
+ extern f_return_status f_socket_close_client(const int id, const unsigned short action);
+#endif // _di_f_socket_close_client_
+
#ifdef __cplusplus
} // extern "C"
#endif
-f_type
+f_memory
f_status
+f_string
+f_type
build_language c
build_linker ar
build_libraries -lc
-build_libraries-individual
-build_sources_library
+build_libraries-individual -lf_memory
+build_sources_library socket.c
build_sources_program
build_sources_headers socket.h
build_sources_script
+++ /dev/null
-/**
- * FLL - Level 1
- *
- * Project: Socket
- * API Version: 0.5
- * Licenses: lgplv2.1
- *
- * Provide means to connect to and use sockets.
- */
-#ifndef _FL_socket_h
-#define _FL_socket_h
-
-// libc includes
-#include <malloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <unistd.h>
-
-// fll-0 includes
-#include <level_0/status.h>
-#include <level_0/string.h>
-#include <level_0/type.h>
-#include <level_0/socket.h>
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * Bind a UNIX socket.
- *
- * @param path
- * The path to a socket file to bind to.
- * @param id
- * The ID of a socket.
- * @param address
- * The socket address information.
- *
- * @return
- * F_none on success.
- * F_address (with error bit) if address is already in use (therefore unavailable).
- * F_buffer (with error bit) if the buffer is invalid.
- * F_busy_address (with error bit) if address is already in use (therefore unavailable).
- * F_busy_socket (with error bit) if socket defined by id is already bound (therefore unavailable).
- * F_descriptor (with error bit) if the id is not a socket descriptor.
- * F_directory_found_not (with error bit) if directory was not found.
- * F_file_found_not (with error bit) if file not found.
- * F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) on path name error.
- * F_string_too_large (with error bit) if string is too large to store in the buffer.
- * F_unavailable_address (with error bit) if address is unavailable (is non-existent or not local).
- *
- * @see bind()
- */
-#ifndef _di_fl_socket_file_bind_
- extern f_return_status fl_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address);
-#endif // _di_fl_socket_file_bind_
-
-/**
- * Terminate a socket connection.
- *
- * @param id
- * The ID of a socket.
- * @param max_backlog
- * The max length of the pending connections queue.
- * Suggested default setting: 8.
- *
- * @return
- * F_none on success.
- * F_busy_address (with error bit) if address is already in use (therefore unavailable).
- * F_descriptor (with error bit) if the id is not a socket descriptor.
- * F_file_descriptor (with error bit) if id is an invalid descriptor.
- * F_unsupported (with error bit) if this socket does not support the listen() operation.
- *
- * @see listen()
- */
-#ifndef _di_fl_socket_listen_
- extern f_return_status fl_socket_listen(const int id, const unsigned int max_backlog);
-#endif // _di_fl_socket_listen_
-
-/**
- * Terminate a client socket connection.
- *
- * @param id
- * The ID of a socket.
- * @param action
- * The action to perform on close.
- * f_socket_close_fast calls close().
- *
- * @return
- * F_none on success.
- * F_connected_not if the socket is not connected.
- * F_busy_address (with error bit) if address is already in use (therefore unavailable).
- * F_descriptor (with error bit) if the id is not a socket descriptor.
- * F_file_descriptor (with error bit) if id is an invalid descriptor.
- * F_filesystem_quota_block (with error bit) if filesystem's disk blocks or inodes are exhausted.
- * F_input_output (with error bit) if an I/O error occurred.
- * F_interrupted (with error bit) when program received an interrupt signal, halting operation.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
- * F_unsupported (with error bit) if this socket does not support the listen() operation.
- *
- * @see close()
- * @see shutdown()
- */
-#ifndef _di_fl_socket_close_client_
- extern f_return_status fl_socket_close_client(const int id, const unsigned short action);
-#endif // _di_fl_socket_close_client_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _FL_socket_h
+++ /dev/null
-# fss-0000
-
+++ /dev/null
-f_type
-f_status
-f_socket
+++ /dev/null
-# fss-0001
-
-project_name fl_socket
-
-version_major 0
-version_minor 5
-version_micro 0
-version_target major
-
-environment
-
-process_pre
-process_post
-
-modes individual
-modes_default individual
-
-build_compiler gcc
-build_language c
-build_linker ar
-build_libraries -lc
-build_libraries-individual
-build_sources_library socket.c
-build_sources_program
-build_sources_headers socket.h
-build_sources_script
-build_sources_setting
-build_script yes
-build_shared yes
-build_static yes
-
-path_headers level_1
-path_library_script script
-path_library_shared shared
-path_library_static static
-path_program_script script
-path_program_shared shared
-path_program_static static
-
-search_exclusive yes
-search_shared yes
-search_static yes
-
-defines_all
-defines_static
-defines_shared
-
-flags_all -z now -g
-flags_shared
-flags_static
-flags_library -fPIC
-flags_program -fPIE