mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
cleanup: Don't make nbis depend on libfprint built-sources
Now that nbis is a static library it should be possible to compile it without any fprint-built dependency, although since it included fp_internal there was a compile-time dependency on the fp-enums that can be generated at later times. So: - Move nbis-helpers to nbis includes (and remove inclusion in fp_internal) - Move the Minutiae definitions inside a standalone fpi-minutiae header - Include fpi-minutiae.h in fp_internal.h - Include nbis-hepers.h and fpi-minutiae.h in nbis' lfs.h - Adapt missing definitions in libfprint
This commit is contained in:
@@ -66,7 +66,8 @@ of the software.
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <fp_internal.h>
|
||||
#include <nbis-helpers.h>
|
||||
#include <fpi-minutiae.h>
|
||||
|
||||
/*************************************************************************/
|
||||
/* OUTPUT FILE EXTENSIONS */
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
--- include/lfs.h 2018-08-24 15:31:54.535579623 +0200
|
||||
+++ include/lfs.h.orig 2018-08-24 15:31:48.781587933 +0200
|
||||
@@ -66,7 +43,7 @@ of the software.
|
||||
--- include/lfs.h
|
||||
+++ include/lfs.h
|
||||
@@ -66,7 +66,8 @@ of the software.
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
-#include <an2k.h> /* Needed by to_type9.c */
|
||||
+#include <fp_internal.h>
|
||||
+#include <nbis-helpers.h>
|
||||
+#include <fpi-minutiae.h>
|
||||
|
||||
/*************************************************************************/
|
||||
/* OUTPUT FILE EXTENSIONS */
|
||||
@@ -154,26 +131,8 @@ typedef struct rotgrids{
|
||||
@@ -154,26 +155,8 @@ typedef struct rotgrids{
|
||||
#define DISAPPEARING 0
|
||||
#define APPEARING 1
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
|
||||
typedef struct feature_pattern{
|
||||
int type;
|
||||
@@ -1185,17 +1185,6 @@ extern void bubble_sort_double_inc_2(double *, int *, const int);
|
||||
@@ -1203,17 +1186,6 @@ extern void bubble_sort_double_inc_2(double *, int *, const int);
|
||||
extern void bubble_sort_double_dec_2(double *, int *, const int);
|
||||
extern void bubble_sort_int_inc(int *, const int);
|
||||
|
||||
|
||||
33
libfprint/nbis/libfprint-include/nbis-helpers.h
Normal file
33
libfprint/nbis/libfprint-include/nbis-helpers.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Helpers to use within the NBIS copy/paste library
|
||||
* Copyright (C) 2018 Bastien Nocera <hadess@hadess.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#define ASSERT_SIZE_MUL(a,b) \
|
||||
{ \
|
||||
gsize dest; \
|
||||
g_assert(g_size_checked_mul(&dest, a, b)); \
|
||||
}
|
||||
|
||||
#define ASSERT_INT_MUL(a, b) \
|
||||
{ \
|
||||
gsize dest; \
|
||||
g_assert(g_size_checked_mul(&dest, a, b)); \
|
||||
g_assert(dest < G_MAXINT); \
|
||||
}
|
||||
Reference in New Issue
Block a user