lib: introduce GUESTFS_NO_DEPRECATED

Add a simple way to do not even provide prototypes of deprecated
functions in the C library: this way, users (like our tools) can build
against the library making sure to not use any deprecated function, not
even when compiler deprecation warnings are disabled.

Add it to the majority of our tools/internal libraries, and make sure
that it is not defined when building the API bridges of our bindings.
This commit is contained in:
Pino Toscano
2019-04-23 12:58:05 +02:00
parent 9d1fc91cca
commit d8d8c856a1
37 changed files with 62 additions and 1 deletions

View File

@@ -333,6 +333,7 @@ and generate_erlang_actions actions () =
/* It is safe to call deprecated functions from this file. */
#define GUESTFS_NO_WARN_DEPRECATED
#undef GUESTFS_NO_DEPRECATED
#include <stdio.h>
#include <stdlib.h>