aboutsummaryrefslogtreecommitdiffstats
path: root/compat/compiler.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-10-17mingw.c: Fix complier warnings for a 64 bit msvcSören Krecker1-2/+2
Remove some complier warnings from msvc in compat/mingw.c for value truncation from 64 bit to 32 bit integers. Compiling compat/mingw.c under a 64 bit version of msvc produces warnings. An "int" is 32 bit, and ssize_t or size_t should be 64 bit long. Prepare compat/vcbuild/include/unistd.h to have a 64 bit type _ssize_t, when _WIN64 is defined and 32 bit otherwise. Further down in this include file, as before, ssize_t is defined as _ssize_t, if needed. Use size_t instead of int for all variables that hold the result of strlen() or wcslen() (which cannot be negative). Use ssize_t to hold the return value of read(). Signed-off-by: Sören Krecker <soekkle@freenet.de> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2024-02-24compat: drop inclusion of <git-compat-util.h>Junio C Hamano1-1/+0
These two header files are included from ordinary source files that already include <git-compat-util.h> as the first header file as they should. There is no need to include the compat-util in these headers. "make hdr-check" is not affected, as it is designed to assume that what <git-compat-util.h> offers is available to everybody without being included. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-16bugreport: add compiler infoEmily Shaffer1-0/+41
To help pinpoint the source of a regression, it is useful to know some info about the compiler which the user's Git client was built with. By adding a generic get_compiler_info() in 'compat/' we can choose which relevant information to share per compiler; to get started, let's demonstrate the version of glibc if the user built with 'gcc'. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>