search for: generate_head

Displaying 20 results from an estimated 133 matches for "generate_head".

Did you mean: generate_header
2016 Feb 23
7
[PATCH 0/4] Various tweaks to the generator.
Use interfaces files (*.mli files) instead of exporting all symbols randomly. Change the 'file is generated' warnings at the top of generated files so they accurately describe which source file generates each output file. Rich.
2020 Jan 09
9
[PATCH 0/7] Various Python cleanups.
Patch #7 depends on: https://www.redhat.com/archives/libguestfs/2020-January/msg00035.html No, Python < 3 support is not dropped yet, however it will be easier after this series. Pino Toscano (7): build: enforce a minimum Python version python: drop code for Python < 2.5 python: assume support for Capsules python: remove compile time check for PyString_AsString python: replace
2020 Jan 09
0
[PATCH 6/7] python: stop including config.h
...ady. --- generator/python.ml | 6 ------ python/handle.c | 2 -- 2 files changed, 8 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index 0e1ed20d8..fd297321e 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -119,8 +119,6 @@ and generate_python_structs () = generate_header CStyle LGPLv2plus; pr "\ -#include <config.h> - #include <stdio.h> #include <stdlib.h> #include <assert.h> @@ -251,8 +249,6 @@ and generate_python_actions actions () = generate_header CStyle LGPLv2plus; pr "\ -#include <config.h> - /* It is...
2016 Feb 26
1
[PATCH] doc: add info on per-function needed feature
Document which feature, if any, is needed for a function; this should help users in properly checking feature availability when using certain functions. --- generator/c.ml | 6 ++++++ generator/fish.ml | 10 +++++++++- generator/gobject.ml | 8 ++++++++ generator/java.ml | 7 +++++++ generator/ocaml.ml | 7 +++++++ generator/perl.ml | 6 ++++++ generator/python.ml | 5
2017 Jul 14
0
[PATCH 16/27] daemon: Generate OCaml wrappers for optgroup_*_available functions.
...enerator/daemon.ml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index fd01e5d8a..1d7461f8c 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -976,6 +976,10 @@ let generate_daemon_optgroups_c () = generate_header CStyle GPLv2plus; pr "#include <config.h>\n"; + pr "#include <stdio.h>\n"; + pr "#include <stdlib.h>\n"; + pr "\n"; + pr "#include <caml/mlvalues.h>\n"; pr "\n"; pr "#include \"daemon.h\&q...
2019 Jun 27
0
[PATCH 2/9] Rust bindings: Add create / close functions
...+++++++++++++++++++++++++- rust/Cargo.toml | 2 ++ 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/generator/rust.ml b/generator/rust.ml index 83afdfe73..dbe9db010 100644 --- a/generator/rust.ml +++ b/generator/rust.ml @@ -31,4 +31,86 @@ open Events let generate_rust () = - generate_header CStyle LGPLv2plus; \ No newline at end of file + generate_header CStyle LGPLv2plus; + + pr " +#[allow(non_camel_case_types)] +enum guestfs_h {} + +extern \"C\" { + fn guestfs_create() -> *mut guestfs_h; + fn guestfs_create_flags(flags: i64) -> *mut guestfs_h; + fn...
2012 Aug 26
1
[PATCH] Mac OS X: Fixed combination of running autogen.sh on Linux and building on Mac OS X
...at gmail.com> --- generator/generator_xdr.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/generator/generator_xdr.ml b/generator/generator_xdr.ml index 9acea8f..ef9e0f2 100644 --- a/generator/generator_xdr.ml +++ b/generator/generator_xdr.ml @@ -40,6 +40,7 @@ let generate_xdr () = generate_header CStyle LGPLv2plus; (* This has to be defined to get around a limitation in Mac OS X's rpcgen. *) + pr "%%#include <config.h>\n"; pr "#if HAVE_XDR_U_INT64_T\n"; pr "#define uint64_t u_int64_t\n"; pr "%%#if HAVE_XDR_UINT64_T\n"; -- 1...
2020 Jan 10
2
Re: [PATCH 6/7] python: stop including config.h
...and shouldn't need to be bundled (so patch #7 would be OK). Rich. > diff --git a/generator/python.ml b/generator/python.ml > index 0e1ed20d8..fd297321e 100644 > --- a/generator/python.ml > +++ b/generator/python.ml > @@ -119,8 +119,6 @@ and generate_python_structs () = > generate_header CStyle LGPLv2plus; > > pr "\ > -#include <config.h> > - > #include <stdio.h> > #include <stdlib.h> > #include <assert.h> > @@ -251,8 +249,6 @@ and generate_python_actions actions () = > generate_header CStyle LGPLv2plus; > &g...
2016 Apr 11
1
[PATCH] fish: improve formatting of help text of generated commands
...ist.sort func_compare all +let c_quoted_indented ~indent str = + let str = c_quote str in + let str = replace_str str "\\n" ("\\n\"\n" ^ indent ^ "\"") in + str + (* Generate a lot of different functions for guestfish. *) let generate_fish_cmds () = generate_header CStyle GPLv2plus; @@ -138,7 +143,7 @@ let generate_fish_cmds () = pr "struct command_entry %s_cmd_entry = {\n" name; pr " .name = \"%s\",\n" name2; - pr " .help = \"%s\",\n" (c_quote text); + pr " .help = \"%...
2012 Apr 26
1
[PATCH] gobject: Move headers into a subdirectory
...tput_source filename ?(title=None) ?(shortdesc=None) ?(longdesc=None) f = - let file = sprintf "guestfs-gobject-%s" filename in - let source = sprintf "gobject/%s.c" file in + let source = sprintf "gobject/src/%s.c" filename in output_to source (fun () -> generate_header CStyle GPLv2plus; pr "#include \"guestfs-gobject.h\"\n\n"; pr "/**\n"; - pr " * SECTION:%s\n" file; + pr " * SECTION:%s\n" filename; (match title with | Some title -> @@ -188,19 +187,20 @@ let output_source filen...
2012 Mar 28
1
[PATCH] Split gobject sources into 1 file per class
This patch replaces patches 14 and 15 from my previous series. The gtk-doc output is now reasonable, and we can rely on an automatically generated guestfs-sections.txt. Matt
2019 Jun 03
1
[libnbd PATCH] generator: Add #define witnesses for all API
...print_call name args ret; pr ";\n" +let print_extern_and_define name args ret = + let name_upper = String.uppercase_ascii name in + print_extern name args ret; + pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper; + pr "\n" + let generate_include_libnbd_h () = generate_header CStyle; @@ -2729,14 +2735,23 @@ let generate_include_libnbd_h () = List.iter (fun (n, i) -> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; + pr "#define LIBNBD_HAVE_NBD_CREATE 1\n";...
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.
2017 Mar 10
2
[PATCH 1/2] daemon: generate cleanup handlers for structs
...x 3941d97..9453d12 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -840,3 +840,104 @@ let generate_daemon_optgroups_h () = ) optgroups; pr "#endif /* GUESTFSD_OPTGROUPS_H */\n" + +(* Generate structs-cleanups.c file. *) +and generate_daemon_structs_cleanups_c () = + generate_header CStyle GPLv2plus; + + pr "\ +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> + +#include \"daemon.h\" +#include \"guestfs_protocol.h\" + +"; + + pr "/* Cleanup functions used by CLEANUP_* macros. Do not call\n"; + pr &qu...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
.../sysprep/.depend diff --git a/generator/c.ml b/generator/c.ml index 417e2bc..9af4529 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -1204,6 +1204,130 @@ and generate_client_structs_cleanup () = ) structs +(* Generate structs-print.c file. *) +and generate_client_structs_print_c () = + generate_header CStyle LGPLv2plus; + + pr "\ +#include <config.h> + +#include <inttypes.h> + +#include \"c-ctype.h\" + +#include \"guestfs.h\" +#include \"structs-print.h\" + +"; + + let write_structs = + List.iter ( + fun { s_name = typ; s_cols = col...
2015 Aug 24
3
[PATCH 1/3] ocaml: dynamically generate the content of Guestfs.Errno
...0,6 +30,14 @@ open Structs open C open Events +(* List of errnos to expose on Guestfs.Errno. *) +let ocaml_errnos = [ + "EINVAL"; + "ENOTSUP"; + "EPERM"; + "ESRCH"; +] + (* Generate the OCaml bindings interface. *) let rec generate_ocaml_mli () = generate_header OCamlStyle LGPLv2plus; @@ -132,10 +140,12 @@ val last_errno : t -> int which you can use to test the return value of {!Guestfs.last_errno}. *) module Errno : sig - val errno_EINVAL : int - val errno_ENOTSUP : int - val errno_EPERM : int - val errno_ESRCH : int +"; + List.iter...
2019 Jul 02
0
[PATCH 01/12] Rust bindings: Add Rust bindings
...cmo \ customize.cmo \ diff --git a/generator/bindtests.ml b/generator/bindtests.ml index 58d7897b3..8a5682d5e 100644 --- a/generator/bindtests.ml +++ b/generator/bindtests.ml @@ -983,6 +983,9 @@ and generate_php_bindtests () = dump "bindtests" +and generate_rust_bindtests () = + generate_header CStyle GPLv2plus + (* Language-independent bindings tests - we do it this way to * ensure there is parity in testing bindings across all languages. *) diff --git a/generator/bindtests.mli b/generator/bindtests.mli index 6f469b3a1..0e18a4c44 100644 --- a/generator/bindtests.mli +++ b/generato...
2013 Feb 18
4
Some fixes for building the Debian package for 1.20.2
I needed to add a few patches to be able to build libguestfs 1.20.2 out of tree. Mostly srcdir/builddir issues -- I think that I had posted something for building the daemon before. As mentioned on IRC, I found that compiling (Ruby bindings) caused config.h file shipped with the Ruby headers to be included rather than ${builddir}/config.h. This can be fixed because the relevant checks can be
2019 Aug 11
5
[PATCH 1/2] Rust bindings: Add long description
...@@ let translate_bad_symbols s = else s +(* output longdesc to the rust file *) +let pr_longdesc name longdesc indent_depth = + let l = pod2text name longdesc in + List.iter (fun x -> + indent indent_depth; + pr "/// %s\n" x; + ) l + let generate_rust () = generate_header ~copyrights CStyle LGPLv2plus; @@ -398,6 +406,8 @@ extern \"C\" { style = (ret, args, optargs) } as f) -> let cname = snake2caml name in pr " /// %s\n" shortdesc; + pr " ///\n"; + pr_longdesc name longdesc 1; pr &q...
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...) = | RStructList (_, typ) -> pr "%s array" typ | RHashtable _ -> pr "(string * string) list" ) + +(* Structure definitions (again). These are used in the daemon, + * but it's convenient to generate them here. + *) +and generate_ocaml_daemon_structs () = + generate_header OCamlStyle GPLv2plus; + + generate_ocaml_structure_decls () diff --git a/generator/OCaml.mli b/generator/OCaml.mli index 4e79a5b5a..a36fbe02f 100644 --- a/generator/OCaml.mli +++ b/generator/OCaml.mli @@ -20,3 +20,4 @@ val generate_ocaml_c : unit -> unit val generate_ocaml_c_errnos : unit -&...