Compare commits
7 Commits
462280fd2f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
02f87e1604
|
|||
|
042bd29094
|
|||
|
d0af81c08d
|
|||
|
cabd2bad9b
|
|||
|
f0583e3d1a
|
|||
|
c420e3ce86
|
|||
|
11567dc05c
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "http-parser"]
|
||||
path = http-parser
|
||||
url = git://github.com/joyent/http-parser.git
|
||||
url = https://github.com/nodejs/http-parser.git
|
||||
[submodule "liberty"]
|
||||
path = liberty
|
||||
url = https://git.janouch.name/p/liberty.git
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
cmake_minimum_required (VERSION 3.0...3.27)
|
||||
project (ponymap VERSION 0.1.0 LANGUAGES C)
|
||||
|
||||
# Moar warnings
|
||||
@@ -13,10 +13,10 @@ set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake)
|
||||
include (AddThreads)
|
||||
|
||||
find_package (Curses)
|
||||
find_package (Ncursesw)
|
||||
find_package (PkgConfig REQUIRED)
|
||||
pkg_check_modules (jansson REQUIRED jansson)
|
||||
pkg_check_modules (libssl REQUIRED libssl libcrypto)
|
||||
pkg_check_modules (ncursesw ncursesw)
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
|
||||
# Need this in FreeBSD and OpenBSD respectively;
|
||||
@@ -24,10 +24,10 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
|
||||
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
|
||||
endif ()
|
||||
|
||||
if (ncursesw_FOUND)
|
||||
set (project_libraries ${ncursesw_LIBRARIES})
|
||||
include_directories (${ncursesw_INCLUDE_DIRS})
|
||||
link_directories (${ncursesw_LIBRARY_DIRS})
|
||||
if (Ncursesw_FOUND)
|
||||
set (project_libraries ${Ncursesw_LIBRARIES})
|
||||
include_directories (${Ncursesw_INCLUDE_DIRS})
|
||||
link_directories (${Ncursesw_LIBRARY_DIRS})
|
||||
elseif (CURSES_FOUND)
|
||||
set (project_libraries ${CURSES_LIBRARY})
|
||||
include_directories (${CURSES_INCLUDE_DIR})
|
||||
@@ -59,7 +59,7 @@ link_directories (${libssl_LIBRARY_DIRS} ${jansson_LIBRARY_DIRS})
|
||||
foreach (extra iconv dl rt)
|
||||
find_library (extra_lib_${extra} ${extra})
|
||||
if (extra_lib_${extra})
|
||||
list (APPEND project_libraries ${extra})
|
||||
list (APPEND project_libraries ${extra_lib_${extra}})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
@@ -70,6 +70,7 @@ set (project_headers ${PROJECT_BINARY_DIR}/config.h)
|
||||
# Generate a configuration file
|
||||
include (GNUInstallDirs)
|
||||
set (plugin_dir ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME})
|
||||
set (full_plugin_dir ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME})
|
||||
configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h)
|
||||
include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@ the maximum number of concurrent connections.
|
||||
|
||||
Packages
|
||||
--------
|
||||
Regular releases are sporadic. git master should be stable enough. You can get
|
||||
a package with the latest development version from Archlinux's AUR.
|
||||
Regular releases are sporadic. git master should be stable enough.
|
||||
You can get a package with the latest development version using Arch Linux's
|
||||
https://aur.archlinux.org/packages/ponymap-git[AUR],
|
||||
or as a https://git.janouch.name/p/nixexprs[Nix derivation].
|
||||
|
||||
Building and Usage
|
||||
------------------
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
#define PROGRAM_VERSION "${PROJECT_VERSION}"
|
||||
|
||||
#cmakedefine WITH_LUA
|
||||
#define PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/${plugin_dir}"
|
||||
#define PLUGIN_DIR "${full_plugin_dir}"
|
||||
|
||||
#endif // ! CONFIG_H
|
||||
|
||||
Submodule http-parser updated: 0b43367131...ec8b5ee63f
2
liberty
2
liberty
Submodule liberty updated: d71c47f8ce...49d7cb12bb
@@ -840,6 +840,7 @@ load_one_plugin (struct app_context *ctx, const char *name, const char *path)
|
||||
void *table = dlopen (path, RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!table)
|
||||
{
|
||||
print_debug ("%s", path);
|
||||
print_error ("could not load `%s': %s", name, dlerror ());
|
||||
return false;
|
||||
}
|
||||
@@ -874,6 +875,7 @@ load_plugins (struct app_context *ctx)
|
||||
DIR *dir = opendir (plugin_dir);
|
||||
if (!dir)
|
||||
{
|
||||
print_debug ("%s", plugin_dir);
|
||||
print_fatal ("%s: %s",
|
||||
"cannot open plugin directory", strerror (errno));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user