diff --git a/align/Makefile.am b/align/Makefile.am index cd80c191b..857253f4c 100644 --- a/align/Makefile.am +++ b/align/Makefile.am @@ -41,7 +41,7 @@ virt_alignment_scan_SOURCES = \ virt_alignment_scan_CFLAGS = \ -DGUESTFS_WARN_DEPRECATED=1 \ - -DGUESTFS_PRIVATE_FUNCTIONS=1 \ + -DGUESTFS_PRIVATE=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/df/Makefile.am b/df/Makefile.am index eeec48498..52cb4ab13 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -44,7 +44,7 @@ virt_df_SOURCES = \ virt_df_CFLAGS = \ -DGUESTFS_WARN_DEPRECATED=1 \ - -DGUESTFS_PRIVATE_FUNCTIONS=1 \ + -DGUESTFS_PRIVATE=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/erlang/Makefile.am b/erlang/Makefile.am index 8c1e887e3..c59363021 100644 --- a/erlang/Makefile.am +++ b/erlang/Makefile.am @@ -45,6 +45,7 @@ erl_guestfs_CFLAGS = \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ -I$(ERLANG_LIB_DIR_erl_interface)/include \ + -DGUESTFS_PRIVATE=1 \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(GPROF_CFLAGS) $(GCOV_CFLAGS) diff --git a/generator/actions.ml b/generator/actions.ml index 13451a6d1..abed6519e 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -28,7 +28,7 @@ let defaults = { name = ""; style = RErr, [], []; proc_nr = None; tests = []; shortdesc = ""; longdesc = ""; protocol_limit_warning = false; fish_alias = []; fish_output = None; in_fish = true; in_docs = true; - deprecated_by = None; optional = None; + internal = false; deprecated_by = None; optional = None; progress = false; camel_name = ""; cancellable = false; config_only = false; once_had_no_optargs = false; blocking = true; @@ -76,7 +76,7 @@ let test_functions = [ { defaults with name = "internal_test"; style = RErr, test_all_args, test_all_optargs; - in_fish = false; in_docs = false; cancellable = true; + in_fish = false; in_docs = false; internal = true; cancellable = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -92,7 +92,7 @@ You probably don't want to call this function." }; { defaults with name = "internal_test_only_optargs"; style = RErr, [], [OInt "test"]; - in_fish = false; in_docs = false; cancellable = true; + in_fish = false; in_docs = false; internal = true; cancellable = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -108,7 +108,7 @@ You probably don't want to call this function." }; { defaults with name = "internal_test_63_optargs"; style = RErr, [], [OInt "opt1"; OInt "opt2"; OInt "opt3"; OInt "opt4"; OInt "opt5"; OInt "opt6"; OInt "opt7"; OInt "opt8"; OInt "opt9"; OInt "opt10"; OInt "opt11"; OInt "opt12"; OInt "opt13"; OInt "opt14"; OInt "opt15"; OInt "opt16"; OInt "opt17"; OInt "opt18"; OInt "opt19"; OInt "opt20"; OInt "opt21"; OInt "opt22"; OInt "opt23"; OInt "opt24"; OInt "opt25"; OInt "opt26"; OInt "opt27"; OInt "opt28"; OInt "opt29"; OInt "opt30"; OInt "opt31"; OInt "opt32"; OInt "opt33"; OInt "opt34"; OInt "opt35"; OInt "opt36"; OInt "opt37"; OInt "opt38"; OInt "opt39"; OInt "opt40"; OInt "opt41"; OInt "opt42"; OInt "opt43"; OInt "opt44"; OInt "opt45"; OInt "opt46"; OInt "opt47"; OInt "opt48"; OInt "opt49"; OInt "opt50"; OInt "opt51"; OInt "opt52"; OInt "opt53"; OInt "opt54"; OInt "opt55"; OInt "opt56"; OInt "opt57"; OInt "opt58"; OInt "opt59"; OInt "opt60"; OInt "opt61"; OInt "opt62"; OInt "opt63"]; - in_fish = false; in_docs = false; cancellable = true; + in_fish = false; in_docs = false; internal = true; cancellable = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -128,7 +128,7 @@ You probably don't want to call this function." } { defaults with name = name; style = ret, [String "val"], []; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -142,7 +142,7 @@ You probably don't want to call this function." }; { defaults with name = name ^ "err"; style = ret, [], []; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -166,7 +166,7 @@ let non_daemon_functions = test_functions @ [ { defaults with name = "internal_test_set_output"; style = RErr, [String "filename"], []; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -181,7 +181,7 @@ You probably don't want to call this function." }; { defaults with name = "internal_test_close_output"; style = RErr, [], []; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; blocking = false; shortdesc = "internal test function - do not use"; longdesc = "\ @@ -6826,7 +6826,7 @@ yourself (Augeas support makes this relatively easy)." }; name = "internal_lstatlist"; style = RStructList ("statbufs", "stat"), [Pathname "path"; StringList "names"], []; proc_nr = Some 204; - in_docs = false; in_fish = false; + in_docs = false; in_fish = false; internal = true; shortdesc = "lstat on multiple files"; longdesc = "\ This call allows you to perform the C operation @@ -6850,7 +6850,7 @@ into smaller groups of names." }; name = "internal_lxattrlist"; style = RStructList ("xattrs", "xattr"), [Pathname "path"; StringList "names"], []; proc_nr = Some 205; - in_docs = false; in_fish = false; + in_docs = false; in_fish = false; internal = true; optional = Some "linuxxattrs"; shortdesc = "lgetxattr on multiple files"; longdesc = "\ @@ -6880,7 +6880,7 @@ into smaller groups of names." }; name = "internal_readlinklist"; style = RStringList "links", [Pathname "path"; StringList "names"], []; proc_nr = Some 206; - in_docs = false; in_fish = false; + in_docs = false; in_fish = false; internal = true; shortdesc = "readlink on multiple files"; longdesc = "\ This call allows you to do a C operation @@ -7678,7 +7678,7 @@ to ensure the length of the file is exactly C bytes." }; name = "internal_write"; style = RErr, [Pathname "path"; BufferIn "content"], []; proc_nr = Some 246; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; protocol_limit_warning = true; tests = [ InitScratchFS, Always, TestOutput ( @@ -8394,7 +8394,7 @@ See also L." }; name = "internal_autosync"; style = RErr, [], []; proc_nr = Some 282; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; shortdesc = "internal autosync operation"; longdesc = "\ This command performs the autosync operation just before the @@ -8540,7 +8540,7 @@ See also L." }; name = "internal_write_append"; style = RErr, [Pathname "path"; BufferIn "content"], []; proc_nr = Some 290; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; protocol_limit_warning = true; tests = [ InitScratchFS, Always, TestOutput ( @@ -10302,7 +10302,7 @@ are the full raw block device and partition names name = "internal_hot_add_drive"; style = RErr, [String "label"], []; proc_nr = Some 370; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; tests = []; shortdesc = "internal hotplugging operation"; longdesc = "\ @@ -10312,7 +10312,7 @@ This function is used internally when hotplugging drives." }; name = "internal_hot_remove_drive_precheck"; style = RErr, [String "label"], []; proc_nr = Some 371; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; tests = []; shortdesc = "internal hotplugging operation"; longdesc = "\ @@ -10322,7 +10322,7 @@ This function is used internally when hotplugging drives." }; name = "internal_hot_remove_drive"; style = RErr, [String "label"], []; proc_nr = Some 372; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; tests = []; shortdesc = "internal hotplugging operation"; longdesc = "\ @@ -11054,11 +11054,23 @@ let non_daemon_functions, daemon_functions = (* All functions. *) let all_functions = non_daemon_functions @ daemon_functions +let external_functions = + List.filter (fun x -> not x.internal) all_functions + +let internal_functions = + List.filter (fun x -> x.internal) all_functions + (* In some places we want the functions to be displayed sorted * alphabetically, so this is useful: *) let all_functions_sorted = List.sort action_compare all_functions +let external_functions_sorted = + List.sort action_compare external_functions + +let internal_functions_sorted = + List.sort action_compare internal_functions + (* This is used to generate the src/MAX_PROC_NR file which * contains the maximum procedure number, a surrogate for the * ABI version number. See src/Makefile.am for the details. diff --git a/generator/actions.mli b/generator/actions.mli index 1ad509ae0..26ae7e953 100644 --- a/generator/actions.mli +++ b/generator/actions.mli @@ -29,9 +29,21 @@ val daemon_functions : Types.action list val all_functions : Types.action list (** Concatenation of [non_daemon_functions] and [daemon_functions] lists. *) +val external_functions : Types.action list +(** [all_functions] filtered for external functions **) + +val internal_functions : Types.action list +(** [all_functions] filtered for internal functions **) + val all_functions_sorted : Types.action list (** [all_functions] but sorted by name. *) +val external_functions_sorted : Types.action list +(** [external_functions] but sorted by name. *) + +val internal_functions_sorted : Types.action list +(** [internal_functions] but sorted by name. *) + val test_functions : Types.action list (** Internal test functions used to test the language bindings. *) diff --git a/generator/c.ml b/generator/c.ml index 68f25712b..87c6f48c2 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -566,7 +566,7 @@ extern GUESTFS_DLL_PUBLIC void *guestfs_next_private (guestfs_h *g, const char * *) (* Public structures. *) - List.iter ( + let generate_all_structs = List.iter ( fun { s_name = typ; s_cols = cols } -> pr "struct guestfs_%s {\n" typ; List.iter ( @@ -593,7 +593,9 @@ extern GUESTFS_DLL_PUBLIC void *guestfs_next_private (guestfs_h *g, const char * pr "extern GUESTFS_DLL_PUBLIC void guestfs_free_%s (struct guestfs_%s *);\n" typ typ; pr "extern GUESTFS_DLL_PUBLIC void guestfs_free_%s_list (struct guestfs_%s_list *);\n" typ typ; pr "\n" - ) structs; + ) in + + generate_all_structs external_structs; pr "\ /* Actions. */ @@ -663,7 +665,7 @@ extern GUESTFS_DLL_PUBLIC void *guestfs_next_private (guestfs_h *g, const char * pr "\n" in - List.iter ( + let generate_all_headers = List.iter ( fun ({ name = name; style = ret, args, _ } as f) -> (* If once_had_no_optargs is set, then we need to generate a * _opts variant, plus a backwards-compatible wrapper @@ -675,18 +677,19 @@ extern GUESTFS_DLL_PUBLIC void *guestfs_next_private (guestfs_h *g, const char * ) else generate_action_header f - ) all_functions_sorted; + ) in + + generate_all_headers external_functions_sorted; pr "\ -#if GUESTFS_PRIVATE_FUNCTIONS - -/* Private functions. - * - * These are NOT part of the public, stable API, and can change at any - * time! We export them because they are used by some of the language - * bindings. +#if GUESTFS_PRIVATE +/* Symbols protected by GUESTFS_PRIVATE are NOT part of the public, + * stable API, and can change at any time! We export them because + * they are used by some of the language bindings. */ +/* Private functions. */ + extern GUESTFS_DLL_PUBLIC void *guestfs___safe_malloc (guestfs_h *g, size_t nbytes); extern GUESTFS_DLL_PUBLIC void *guestfs___safe_calloc (guestfs_h *g, size_t n, size_t s); extern GUESTFS_DLL_PUBLIC char *guestfs___safe_strdup (guestfs_h *g, const char *str); @@ -694,7 +697,30 @@ extern GUESTFS_DLL_PUBLIC void *guestfs___safe_memdup (guestfs_h *g, const void extern GUESTFS_DLL_PUBLIC int guestfs___for_each_disk (guestfs_h *g, /* virDomainPtr */ void *dom, int (*)(guestfs_h *g, const char *filename, const char *format, int readonly, void *data), void *data); -#endif /* End of private functions. */ +"; + + generate_all_headers internal_functions_sorted; + + pr "\ +/* Private structures. */ + +"; + + generate_all_structs internal_structs; + +pr "\ +/* Deprecated macros for internal functions. */ + +"; + + List.iter ( + fun { name = shortname } -> + pr "#define LIBGUESTFS_HAVE_%s 1\n" (String.uppercase shortname); + ) internal_functions_sorted; + +pr "\ + +#endif /* End of GUESTFS_PRIVATE. */ /* Deprecated macros. Use GUESTFS_HAVE_* instead. */ @@ -717,7 +743,7 @@ extern GUESTFS_DLL_PUBLIC int guestfs___for_each_disk (guestfs_h *g, /* virDomai List.iter ( fun { name = shortname } -> pr "#define LIBGUESTFS_HAVE_%s 1\n" (String.uppercase shortname); - ) all_functions_sorted; + ) external_functions_sorted; pr " /* End of deprecated macros. */ diff --git a/generator/erlang.ml b/generator/erlang.ml index 6c7eb70a6..68418fb87 100644 --- a/generator/erlang.ml +++ b/generator/erlang.ml @@ -270,7 +270,7 @@ extern void free_strings (char **r); pr " return erl_mk_list (t, %d);\n" (List.length cols); pr "}\n"; pr "\n"; - ) structs; + ) external_structs; (* Emit a copy_TYPE_list function definition only if that function is used. *) List.iter ( diff --git a/generator/fish.ml b/generator/fish.ml index 59c111467..995b56a19 100644 --- a/generator/fish.ml +++ b/generator/fish.ml @@ -279,7 +279,7 @@ Guestfish will prompt for these separately." ) cols; pr "}\n"; pr "\n"; - ) structs; + ) external_structs; (* Emit a print_TYPE_list function definition only if that function is used. *) List.iter ( diff --git a/generator/gobject.ml b/generator/gobject.ml index 6c35e0245..516956465 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -107,7 +107,7 @@ let filenames = "session" :: "tristate" :: (* structs *) - List.map (fun { s_name = typ } -> "struct-" ^ typ) structs @ + List.map (fun { s_name = typ } -> "struct-" ^ typ) external_structs @ (* optargs *) List.map (function { name = name } -> "optargs-" ^ name) ( diff --git a/generator/main.ml b/generator/main.ml index 69ebe0576..1d35a5373 100644 --- a/generator/main.ml +++ b/generator/main.ml @@ -170,7 +170,7 @@ Run it from the top source directory using the command output_to filename (generate_gobject_struct_header short typ cols); let filename = sprintf "gobject/src/%s.c" short in output_to filename (generate_gobject_struct_source short typ cols) - ) structs; + ) external_structs; delete_except_generated "gobject/include/guestfs-gobject/struct-*.h"; delete_except_generated "gobject/src/struct-*.c"; diff --git a/generator/ocaml.ml b/generator/ocaml.ml index 1ecdea812..dfbaf4e03 100644 --- a/generator/ocaml.ml +++ b/generator/ocaml.ml @@ -422,7 +422,7 @@ copy_table (char * const * argv) pr " CAMLreturn (rv);\n"; pr "}\n"; pr "\n"; - ) structs; + ) external_structs; (* Emit a copy_TYPE_list function definition only if that function is used. *) List.iter ( @@ -686,7 +686,7 @@ and generate_ocaml_structure_decls () = ) cols; pr "}\n"; pr "\n" - ) structs + ) external_structs and generate_ocaml_prototype ?(is_external = false) name style = if is_external then pr "external " else pr "val "; diff --git a/generator/python.ml b/generator/python.ml index 5cdca6853..a706d722a 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -240,7 +240,7 @@ free_strings (char **argv) pr "};\n"; pr "\n"; - ) structs; + ) external_structs; (* Emit a put_TYPE_list function definition only if that function is used. *) List.iter ( diff --git a/generator/structs.ml b/generator/structs.ml index 207da90c3..da52dfead 100644 --- a/generator/structs.ml +++ b/generator/structs.ml @@ -26,6 +26,7 @@ type struc = { s_name : string; s_cols : cols; s_camel_name : string; + s_internal : bool; s_unused : unit; (* Silences warning 23 when using 'defaults with ...' *) } @@ -94,7 +95,8 @@ let lvm_lv_cols = [ "modules", FString; ] -let defaults = { s_name = ""; s_cols = []; s_camel_name = ""; s_unused = () } +let defaults = { s_name = ""; s_cols = []; s_camel_name = ""; + s_internal = false; s_unused = () } (* Names and fields in all structures (in RStruct and RStructList) * that we support. @@ -369,3 +371,7 @@ let lookup_struct name = let camel_name_of_struct name = (lookup_struct name).s_camel_name let cols_of_struct name = (lookup_struct name).s_cols + +let external_structs = List.filter (fun x -> not x.s_internal) structs + +let internal_structs = List.filter (fun x -> x.s_internal) structs diff --git a/generator/structs.mli b/generator/structs.mli index f0c2ba65a..20fba8680 100644 --- a/generator/structs.mli +++ b/generator/structs.mli @@ -27,6 +27,7 @@ type struc = { s_name : string; (** Regular name. *) s_cols : cols; (** Columns. *) s_camel_name : string; (** Camel-cased name. *) + s_internal : bool; (** Internal only. *) s_unused : unit; } @@ -48,3 +49,9 @@ val camel_name_of_struct : string -> string val cols_of_struct : string -> cols (** Lookup struct by name, return the s_cols field. *) + +val external_structs : struc list +(** Only external structs *) + +val internal_structs : struc list +(** Only internal structs *) diff --git a/generator/types.ml b/generator/types.ml index e6f56ec8b..c20a76f07 100644 --- a/generator/types.ml +++ b/generator/types.ml @@ -383,6 +383,8 @@ type action = { fish_output : fish_output_t option; (* how to display output in guestfish *) in_fish : bool; (* export via guestfish *) in_docs : bool; (* add this function to documentation *) + internal: bool; (* function is not part of the + external api *) deprecated_by : string option; (* function is deprecated, use .. instead *) optional : string option; (* function is part of an optional group *) progress : bool; (* function can generate progress messages *) diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 864b6b114..a8efec3fa 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -52,6 +52,7 @@ libguestfs_gobject_1_0_ladir = $(includedir)/guestfs-gobject libguestfs_gobject_1_0_la_HEADERS = $(guestfs_gobject_headers) libguestfs_gobject_1_0_la_SOURCES = $(guestfs_gobject_sources) libguestfs_gobject_1_0_la_CFLAGS = -I$(top_srcdir)/src -I$(srcdir)/include \ + -DGUESTFS_PRIVATE=1 \ $(GOBJECT_CFLAGS) libguestfs_gobject_1_0_la_LIBS = $(GOBJECT_LIBS) libguestfs_gobject_1_0_la_LDFLAGS = $(LDFLAGS) -L$(top_builddir)/src diff --git a/java/Makefile.am b/java/Makefile.am index 449f40b15..5f6499ba0 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -79,7 +79,7 @@ libguestfs_jni_la_SOURCES = \ libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared libguestfs_jni_la_CFLAGS = \ - -DGUESTFS_PRIVATE_FUNCTIONS=1 \ + -DGUESTFS_PRIVATE=1 \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(JNI_CFLAGS) diff --git a/lua/Makefile.am b/lua/Makefile.am index 9b0f7de44..621366e92 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -41,6 +41,7 @@ libluaguestfs_la_SOURCES = lua-guestfs.c libluaguestfs_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -I$(top_srcdir)/src -I$(top_builddir)/src \ + -DGUESTFS_PRIVATE=1 \ $(LUA_CFLAGS) libluaguestfs_la_LIBADD = $(top_builddir)/src/libguestfs.la libluaguestfs_la_LDFLAGS = -avoid-version -shared diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 3bd2a7841..f935282ef 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -64,7 +64,7 @@ mlguestfs.cmxa: libguestfsocaml.a guestfs.cmx -L$(top_builddir)/src/.libs -lguestfs libguestfsocaml_a_CFLAGS = \ - -DGUESTFS_PRIVATE_FUNCTIONS=1 \ + -DGUESTFS_PRIVATE=1 \ -I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in index 11a976a4d..5487e98b2 100644 --- a/perl/Makefile.PL.in +++ b/perl/Makefile.PL.in @@ -27,5 +27,5 @@ WriteMakefile ( LIBS => '-L@top_builddir@/src/.libs -lguestfs', INC => '-I@top_builddir@/src -I@top_srcdir@/src', TYPEMAPS => [ '@srcdir@/typemap' ], - CCFLAGS => $Config{ccflags} . ' -DGUESTFS_PRIVATE_FUNCTIONS=1 @CFLAGS@', + CCFLAGS => $Config{ccflags} . ' -DGUESTFS_PRIVATE=1 @CFLAGS@', ); diff --git a/php/Makefile.am b/php/Makefile.am index 220f13a9c..a3690608e 100644 --- a/php/Makefile.am +++ b/php/Makefile.am @@ -43,6 +43,7 @@ all: extension/config.h $(MAKE) -C extension \ EXTRA_INCLUDES="-I$(abs_srcdir)/../src" \ EXTRA_LDFLAGS="-L$(abs_srcdir)/../src/.libs -lguestfs" \ + EXTRA_CFLAGS="-DGUESTFS_PRIVATE=1" \ all extension/config.h: extension/config.m4 ../config.status diff --git a/python/Makefile.am b/python/Makefile.am index d03bfcf68..209f9ca01 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -41,7 +41,7 @@ python_LTLIBRARIES = libguestfsmod.la libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c libguestfsmod_la_CFLAGS = \ - -DGUESTFS_PRIVATE_FUNCTIONS=1 \ + -DGUESTFS_PRIVATE=1 \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -I$(PYTHON_INCLUDEDIR) \ -I$(top_srcdir)/src -I$(top_builddir)/src diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in index 15259eaed..269ca811e 100644 --- a/ruby/ext/guestfs/extconf.rb.in +++ b/ruby/ext/guestfs/extconf.rb.in @@ -30,7 +30,7 @@ unless have_library("guestfs", "guestfs_create", "guestfs.h") end $CFLAGS = - "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE_FUNCTIONS=1 " << + "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE=1 " << "@WARN_CFLAGS@ @WERROR_CFLAGS@" create_header diff --git a/src/Makefile.am b/src/Makefile.am index 1057245b3..acdbe747d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -195,7 +195,7 @@ libguestfs_la_LIBADD += liberrnostring.la libprotocol.la libguestfs_la_CFLAGS = \ -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \ -DGUESTFS_WARN_DEPRECATED=1 \ - -DGUESTFS_PRIVATE_FUNCTIONS=1 \ + -DGUESTFS_PRIVATE=1 \ -DLIBOSINFO_DB_PATH='"$(datadir)/libosinfo/db"' \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(GPROF_CFLAGS) $(GCOV_CFLAGS) \ diff --git a/tests/c-api/Makefile.am b/tests/c-api/Makefile.am index 25078c9f8..0b664d34a 100644 --- a/tests/c-api/Makefile.am +++ b/tests/c-api/Makefile.am @@ -72,6 +72,7 @@ TESTS_ENVIRONMENT = \ tests_SOURCES = tests.c tests_CFLAGS = \ -I$(top_srcdir)/src -I$(top_builddir)/src \ + -DGUESTFS_PRIVATE=1 \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(GPROF_CFLAGS) $(GCOV_CFLAGS) tests_LDADD = $(top_builddir)/src/libguestfs.la