netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCHv2 0/4] support for mini-gmp / embedded friendliness
@ 2015-01-06 22:40 Steven Barth
  2015-01-06 22:40 ` [PATCH 1/4] parser: rename VERSION token to HDRVERSION Steven Barth
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Steven Barth @ 2015-01-06 22:40 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Steven Barth

mini-gmp is a minimal subset of libgmp maintained by the same people
While libgmp compiles to >400KB, adding mini-gmp only results in a
~30KB size increase of nft without the need to link to gmplib.
This increase usability on embedded platforms optimizing for size
and having no other use for libgmp.

This patchset:
* Adds mini-gmp from gmplib 6.0 and adds a configure switch
  --with-mini-gmp to enable it
* Replaces the use of unsupported functions (gmp_printf, gmp_sscanf)
  with suitable replacements
* Fixes some minor issues related to the change

Steven Barth (4):
  parser: rename VERSION token to HDRVERSION
  datatype: use mpz_set_str instead of gmp_sscanf
  erec: use stdio vasprintf instead of gmp_vasprintf
  build: add --with-mini-gmp switch to use mini-gmp instead of libgmp

 INSTALL              |    6 +
 configure.ac         |   17 +-
 include/expression.h |    2 +-
 include/gmputil.h    |   10 +
 include/mini-gmp.h   |  294 ++++
 include/utils.h      |    4 +-
 src/Makefile.am      |    4 +
 src/datatype.c       |    4 +-
 src/erec.c           |    6 +-
 src/evaluate.c       |    8 +-
 src/gmputil.c        |   57 +-
 src/mini-gmp.c       | 4386 ++++++++++++++++++++++++++++++++++++++++++++++++++
 src/parser_bison.y   |    6 +-
 src/scanner.l        |    2 +-
 14 files changed, 4788 insertions(+), 18 deletions(-)
 create mode 100644 include/mini-gmp.h
 create mode 100644 src/mini-gmp.c

-- 
2.1.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-07 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 22:40 [nft PATCHv2 0/4] support for mini-gmp / embedded friendliness Steven Barth
2015-01-06 22:40 ` [PATCH 1/4] parser: rename VERSION token to HDRVERSION Steven Barth
2015-01-06 22:40 ` [PATCH 2/4] datatype: use mpz_set_str instead of gmp_sscanf Steven Barth
2015-01-06 22:40 ` [PATCH 3/4] erec: use stdio vasprintf instead of gmp_vasprintf Steven Barth
2015-01-06 22:40 ` [PATCH 4/4] build: add --with-mini-gmp switch to use mini-gmp instead of libgmp Steven Barth
2015-01-07 12:22 ` [nft PATCHv2 0/4] support for mini-gmp / embedded friendliness Pablo Neira Ayuso
2015-01-07 12:29   ` Steven Barth
2015-01-07 12:52     ` Pablo Neira Ayuso
2015-01-07 13:04 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).