Skip to content

Commit 688a4ec

Browse files
committed
fix(debian): some symbols or patterns disappeared
1 parent 3ca3c3c commit 688a4ec

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ add_executable(base16384_b base16384.c)
2424
IF ((NOT FORCE_32BIT) AND CMAKE_SIZEOF_VOID_P EQUAL 8)
2525
message(STATUS "Adding 64bit libraries...")
2626
add_definitions(-DIS_64BIT_PROCESSOR)
27-
add_library(base16384 SHARED file.c base1464.c)
28-
add_library(base16384_s STATIC file.c base1464.c)
27+
add_library(base16384 SHARED wrap.c file.c base1464.c)
28+
add_library(base16384_s STATIC wrap.c file.c base1464.c)
2929
ELSE ()
3030
message(STATUS "Adding 32bit libraries...")
31-
add_library(base16384 SHARED file.c base1432.c)
32-
add_library(base16384_s STATIC file.c base1432.c)
31+
add_library(base16384 SHARED wrap.c file.c base1432.c)
32+
add_library(base16384_s STATIC wrap.c file.c base1432.c)
3333
ENDIF ()
3434

3535
set_target_properties(base16384_b PROPERTIES OUTPUT_NAME base16384)

base16384.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ base16384_err_t base16384_decode_fp_detailed(base16384_typed_flag_params(FILE*))
244244
base16384_err_t base16384_decode_fd_detailed(base16384_typed_flag_params(int));
245245

246246
#define BASE16384_WRAP_DECL(method, name, type) \
247-
static inline base16384_err_t base16384_##method##_##name(base16384_typed_params(type)) { \
248-
return base16384_##method##_##name##_detailed(input, output, encbuf, decbuf, 0); \
249-
}
247+
base16384_err_t base16384_##method##_##name(base16384_typed_params(type));
250248

251249
BASE16384_WRAP_DECL(encode, file, const char*);
252250
BASE16384_WRAP_DECL(encode, fp, FILE*);

wrap.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* wrap.c
2+
* This file is part of the base16384 distribution (https://github.com/fumiama/base16384).
3+
* Copyright (c) 2022-2024 Fumiama Minamoto.
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
#include "base16384.h"
20+
21+
#define base16384_typed_params(type) type input, type output, char* encbuf, char* decbuf
22+
23+
#define BASE16384_WRAP_DECL(method, name, type) \
24+
base16384_err_t base16384_##method##_##name(base16384_typed_params(type)) { \
25+
return base16384_##method##_##name##_detailed(input, output, encbuf, decbuf, 0); \
26+
}
27+
28+
BASE16384_WRAP_DECL(encode, file, const char*);
29+
BASE16384_WRAP_DECL(encode, fp, FILE*);
30+
BASE16384_WRAP_DECL(encode, fd, int);
31+
32+
BASE16384_WRAP_DECL(decode, file, const char*);
33+
BASE16384_WRAP_DECL(decode, fp, FILE*);
34+
BASE16384_WRAP_DECL(decode, fd, int);
35+
36+
#undef BASE16384_WRAP_DECL
37+
38+
#undef base16384_typed_params

0 commit comments

Comments
 (0)