summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2020-05-19Fix compatibility with mremap and DarwinFrediano Ziglio1-4/+3
Darwin does not have mremap. Use munmap+mmap instead. That code is not in a hot path, number of nodes do not change very often. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-02build: Update spice-common integrationFrediano Ziglio1-2/+1
Use new common.m4 include file to make easier to integrate with spice-common repository. The new include will allow for instance spice-common to add additional dependencies without changes (or minor) to spice-server. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Kevin Pouget <kpouget@redhat.com>
2019-05-07windows: Disable code not working on WindowsFrediano Ziglio2-4/+8
- global signals; - CLOEXEC flag; - mmap and statistics; - IPTOS_LOWDELAY flag; - Unix sockets; - sharing file descriptors through Unix sockets; - TCP_CORK flag. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-23reds_stat: Use EXIT_SUCCESS/EXIT_FAILURE for program resultFrediano Ziglio1-5/+5
-1 is not much portable and standard. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
2018-12-23reds_stat: Print errors on standard error, not standard outputFrediano Ziglio1-3/+3
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
2018-08-30Add support for building with meson/ninjaEduardo Lima (Etrunko)2-0/+8
In a comparison with current autotools build system, meson/ninja provides a huge improvement in build speed, while keeping the same functionalities currently available and being considered more user friendly. The new system coexists within the same repository with the current one, so we can do more extensive testing of its functionality before deciding if the old system can be removed, or for some reason, has to stay for good. - Meson: https://mesonbuild.com This is the equivalent of autogen/configure step in autotools. It generates the files that will be used by ninja to actually build the source code. The project has received lots of traction recently, with many GNOME projects willing to move to this new build system. The following wiki page has more details of the status of the many projects being ported: https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting Meson has a python-like syntax, easy to read, and the documentation on the project is very complete, with a dedicated page on how to port from autotools, explaining how most common use cases can be implemented using meson. http://mesonbuild.com/Porting-from-autotools.html Other important sources of information: http://mesonbuild.com/howtox.html http://mesonbuild.com/Syntax.html http://mesonbuild.com/Reference-manual.html - Ninja: https://ninja-build.org Ninja is the equivalent of make in an autotools setup, which actually builds the source code. It has being used by large and complex projects such as Google Chrome, Android and LLVM. There is not much to say about ninja (other than it is much faster than make) because we won't interact directly with it as much, as meson does the middle man job here. The reasoning for creating ninja in the first place is explained on the following post: http://neugierig.org/software/chromium/notes/2011/02/ninja.html Also its manual provides more in-depth information about the design principles: https://ninja-build.org/manual.html - Basic workflow: Meson package is available for most if not all distros, so, taking Fedora as an example, we only need to run: # dnf -y install meson ninja-build. With Meson, building in-tree is not possible at all, so we need to pass a directory as argument to meson where we want the build to be done. This has the advantage of creating builds with different options under the same parent directory, e.g.: $ meson ./build --prefix=/usr $ meson ./build-extra -Dextra-checks=true -Dalignment-checks=true After configuration is done, we call ninja to actually do the build. $ ninja -C ./build $ ninja -C ./build install Ninja defaults to parallel builds, and this can be changed with the -j flag. $ ninja -j 10 -C ./build - Hacking: * meson.build: Mandatory for the project root and usually found under each directory you want something to be built. * meson_options.txt: Options that can interfere with the result of the build. Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2017-09-14reds_stat: Show single spice file if only one is presentFrediano Ziglio1-3/+29
Simple usage improvement. If only one process using spice is present allow to call reds_stat not passing any pid. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2016-12-08Fix gitignoreVictor Toso1-0/+1
Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-10-27Make reds_stat utility work with both 32 and 64 bit architectures.Frediano Ziglio1-3/+17
Due to alignment problems the structure of statistics file is different between 32 and 64 bit. This as on 32 bit uint64_t is aligned to 4 bytes instead of 8 so sizeof(SpiceStat) can be either 20 (32 bit) or 24 (64 bit). This cause reds_stat utility to be bit dependent. Detect the correct SpiceStat size and use that information. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-10-19Add reds_stat to compiled softwareFrediano Ziglio1-0/+19
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-10-19Remove warnings from reds_stat utilityFrediano Ziglio1-5/+6
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-09-26Make error simpler in reds_statFrediano Ziglio1-10/+10
There's no reason for so hard optimisations so avoid having to maintain multiple labels. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2012-02-14Add casts for compatibility purposesDan McGee1-1/+1
Some non-Linux platforms return a (caddr_t *) result for the return value of mmap(), which is very unfortunate. Add a (void *) cast to explicitly avoid the warning when compiling with -Werror. For the IO vector related stuff, signed vs. unsigned comes into play so adding a (void *) cast here is technically correct for all platforms. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-13Add missing includes of config.hDaniel P. Berrange3-0/+3
Not all files were including config.h
2012-01-13Remove trailing blank linesDaniel P. Berrange3-3/+0
Remove any blank lines at the end of all source files
2010-04-13Relicense everything from GPL to LGPL 2.1+Alexander Larsson3-27/+27
2010-03-09Use macros from <spice/macros.h> rather than duplicate themAlexander Larsson2-14/+6
2010-02-04Use the new header namesAlexander Larsson1-1/+1
I just ran: find -name "*.[ch]" | xargs sed -i -f ../spice-protocol/includes.sed find -name "*.cpp" | xargs sed -i -f ../spice-protocol/includes.sed
2010-02-04Rename symbols that were changed in spice-protocolAlexander Larsson1-12/+12
This is an automatic change using: $ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames $ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-01-04client: use spice icon instead-of solidice iconYaniv Kamay1-1/+12
2009-12-28use spaces instead of tabs in bitmap_to_c and icon_to_c outputYaniv Kamay2-17/+21
2009-10-14fresh startYaniv Kamay3-0/+897