Erwin Janssen [Mon, 10 Oct 2016 22:01:22 +0000 (00:01 +0200)]
Batch file for regression tests for Windows added.
This batch file will execute the new regression tests, for now this only
inclues `shapes.py`. Also added the execution of this file to the Appveyor
configuration.
Instead of checking for the availability of stdint.h and inttypes.h with HAVE_STDINT_H and HAVE_INTTYPES_H, simply include stdint.h. The header stdint.h is part of the C99 standard, so it can be safely assumed that this header is present.
inttypes.h contains everything stdint.h includes, but in all cases here, stdint.h suffices.
This define is only used three times in lib/cgraph:
- In cghdr.h to include vmalloc.h
- In main.c in a function that is never called.
- in mem.c where malloc based allocation is used instead.
The defines _BEGIN_EXTERNS_ and _END_EXTERNS_ define `extern "C"` based on compilation with C++. However, the header files containing this define already have this check in a more conventional way. This additional define is therefore not needed in these files.
There are various checks for the alloca function and a definition of this function if it isn't found. However, the alloca function is never used anywhere in the code. These checks and defintions can therefore be removed.
This function is never used somewhere. Removed the function declaration from sfdisc.h and the file containing the definition.
The define `HAVE_STRUCT_DIOATTR` was only used in this code file, so the check setting this define in `configure.ac` can also be removed.
The header file float.h is part of the standard C library, so we can
assume it is always available. This header file also isn't included in the
sfio build when `_SFBINARY` is defined, resulting in a failed build.
The checks defining `_hdr_float` are removed and <float.h> is only
included were required in lib/sfio: in sfputd.c
There used to be a check that defined `Void_t` as `void` when standard C
was used and `char` otherwise. Since we are always compiling with standard
C and `void` is a valid type, there is no reason to keep this typedef.
It seems that the condition where this macro is defined
(`#if !defined(_DLL_BLD) && defined(_dll_import)`) is never met. This
macro also seems to be meant for very specific scenario.
All in all, it seems safe to remove the macros by replacing them with
the value it gets when the above condition is not met.
This macro is used to simplify function prototyping when using the old
K&R C and more modern C dialects. Only three projects use this macro:
cdt, sfio and vmalloc. K&R is obsolete, so this macro adds no benefits and
only makes the code more complicated.
Definition and usage of this macro is removed from all files.
Change the build directory of libgd to `build` instead of `gdbuild`,
because `build` is ignored by the libgd's .gitignore file. The vcxproject
files have been updated to reflect this change.
Changed the download link for freetype because the link was changed.
Removed old-style function defintions from vmalloc
The functions definitions in vmalloc are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete.
They have been removed from lib/vmalloc and its subprojects, comments have been preserved by converting them to a Doxygen style.
The functions definitions in sfio are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete.
They have been removed from lib/sfio and its subprojects, comments have been preserved by converting time to a Doxygen style.
Removed old-style function defintions from lib/cdt
The functions definitions in cdt are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete.
They have been removed from lib/cdt, but not from the subprojects.
There are multiple checks to set SF_MAXDOUBLE, which is then only used
once. Since we are compiling with standard C and `float.h` is part of the
standard C API, we can use DBL_MAX instead and remove the define of
SF_MAXDOUBLE. This also results in some header files that are no longer
included, so checks for these could also be removed.
This define is used in `lib/sfio` to determine if it is alright to include
`<stdint.h>`. Since we are compiling with standard C and stdint.h is part
of the standard, we can safely assume this check always evaluates to true
and remove it.
This define was only used twice. Once surrounded by a `#if 0` and once
only if HAVE_STDBOOL_H wasn't defined (HAVE_STDBOOL_H is part of the C99
standard library and is always defined).
The header string.h is always present since we are compiling with standard C.
There is no need for this check, since it will always evaluate to true.
In addition to this, most includes of string.h to not use this check.
This define is used in `lib/sfio` to determine if it is alright to include
`<string.h>`. Since we are compiling with standard C and string.h is part
of the standard, we can safely assume this check always evaluates to true
and remove it.
The presence of `socklen_t` is tested and an alternative typedef is
created when `socklen_t` is absent, but `socklen_t` is never used in the
code, this check should be removed.
This define is used in `lib/sfio` and `lib/vmalloc' to determine if it is
alright to include `<stdlib.h>`. Since we are compiling with standard C
and stdlib.h is part of the standard, we can safely assume this check
always evaluates to true and remove it.
The .vcproj files are the old Visual Studio project files. A lot of these
were upgraded and the old versions removed. These vcproj files have an
upgraded .vcxproj, but hadn't been removed yet.
Removed the checks that define `HAVE_GETOPT_H` and `HAVE_GETOPT_DECL`.
Because getopt can be used by the Windows build, these checks are no
longer needed.
These two files were present because Windows doesn't have the getopt
function. With the new getopt library for Windows added, these two files
are no longer needed.
This library should provide the ability to use `getopt` in the Windows
build. The implementatation of the `getopt` function is taken from the
ingraphs library.
Adding this project also added a x64 build configuration to the Visual
Studio solution, but this configuration isn't tested yet.
config.h should always be included, a build without it never happens.
The checks on Linux always succeed, because autotools automatically
defines HAVE_CONFIG_H on all the Makefiles. On Windows this is not the
case. Removing all the checks revealed that multiple projects did not
include config.h because HAVE_CONFIG_H wasn't defined. This was the case
for at least the following projects:
- acyclic
- bcomps
- ccomps
- dijkstra
- ingraphs
- gc
- gml2gv
- graphml2gv
- gv2gml
- gvcolor
- gvgen
- mm2gv
- nop
- pathplan
- rbtree
- sccmap
- topfish
- tred
Added `windows\include` to the additional include directories and adding
some library paths solves some, but not all problems that emerged when the
check was removed and some code actually got compiled that wasn't compiled
before.
Because of the use of `sudo` the created file is owned by root and the default travis user has no permission to deploy it. Using `chown` fixes this.
Also added a condition on the deploy, so only one file gets deployed.
This file isn't used in the build. If I understand correctly, ast_common.h used to be using this file and iffe, but this is no longer the case. It seems safe to remove it.
Casting `strcmp` to `__compar_fn_t` doesn't work on Windows, the build
fails. Instead, cast `strcmp` to the required function type:
`(int(*)(const void*, const void*)`
`bsearch` is used in this function to find a string in a string array. It's not needed to pass the address of `tok` to the function, because `tok` is already a pointer. `gvrender_comparestr` should then cast the values to `(const char)` instead of `*(char**)`, because `s1` and `s2` are strings, not pointers to a string. With this change the function only calls `strcmp`, so passing `strcmp` to `bsearch` has the same effect and `gvrender_comparestr` can be removed.
This gets rid of all the `-Wcast-qual` warnings as well.
There are now two environments, one where the variable DOCKER_BUILD is true and one where it is false. False means a normal build on the Travis build image, true means docker will be used to run a build on a CentOS 7 image. The setup of the CentOS 7 image is done in the Dockerfile in `ci/centos7`. It takes a clean CentOS 7 image and installs the required build utilities and dependencies for a minimal build.
This flag causes errors in the Docker build. Removing it still results in a succesfull build and the previous changelogs indicate that this flag should be removed.
From the Qt documentation (http://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#QCoreApplication::UnicodeUTF8_is_deprecated):
QCoreApplication::UnicodeUTF8 is deprecated
This enum type used to define the 8-bit encoding of character string arguments to translate(). This enum is now obsolete and UTF-8 will be used in all cases. So remove all instances of QCoreApplication::UnicodeUTF8.
Erwin Janssen [Mon, 29 Aug 2016 20:16:59 +0000 (22:16 +0200)]
Resolved "macro redefinition" warnings.
On Windows, the Linux build does not throw this warning, the warning C4005
"macro redefinition" is thrown several hundered times. Most of these could
be prepended by an `#undef`, this resolves the warning.
Erwin Janssen [Mon, 29 Aug 2016 11:54:08 +0000 (13:54 +0200)]
Windows: set <DebugInformationFormat> to default.
Set the <DebugInformationFormat> to default for the release configuration.
The value it had (Zi) is the same as the default value, so the
<DebugInformationFormat> can be safely removed.
Erwin Janssen [Mon, 29 Aug 2016 11:11:51 +0000 (13:11 +0200)]
Windows: Change release output directory
Use $(SolutionDir)Release\Graphviz\bin\ instead of
$(SolutionDir)Graphviz\bin\. This is more consistent and allows for an
easier artifact selection on Appveyor.
Erwin Janssen [Mon, 29 Aug 2016 10:00:52 +0000 (12:00 +0200)]
Windows: enabled Debug build for all projects.
Not all project would build when using the Debug configuration, and some
projects had conflicting settings that didn't allow a Debug build. Both
are fixed.
Erwin Janssen [Thu, 25 Aug 2016 18:01:16 +0000 (20:01 +0200)]
Appveyor: produce two artifacts
Produce two artifacts: one with all the files that are generated during
the build (PDB files for debug, etc.) and one without. The last one is
most suited as a release.