summaryrefslogtreecommitdiff
path: root/src/cc-compat.h
Commit message (Collapse)AuthorAgeFilesLines
* Use __typeof__ GNUC keyword for ISO C compatibilityDuncan Thomson2021-09-081-7/+1
|
* formattinglhchavez2021-08-081-4/+4
|
* Proof-of-concept for a more aggressive GIT_UNUSED()lhchavez2021-08-081-1/+9
| | | | | | This adds a `-Wunused-result`-proof `GIT_UNUSED()`, just to demonstrate that it works. With this, sortedcache.h is now completely `GIT_WARN_UNUSED_RESULT`-annotated!
* Fix some typosAaron Franke2021-02-151-1/+1
|
* Remove public 'inttypes.h' headerethomson/inttypesEdward Thomson2019-02-211-0/+5
| | | | | | | | | | | Remove an `inttypes.h` header that is too large in scope, and far too public. For Visual Studio 2012 and earlier (ie, `_MSC_VER < 1800`), we do need to include `stdint.h` in our public headers, for types like `uint32_t`. Internally, we also need to define `PRId64` as a printf formatting string when it is not available.
* Explanation for the rationale behind splitting formattinglhchavez2019-01-091-0/+1
|
* Windows is hard.lhchavez2019-01-061-0/+3
|
* Attempt at fixing the MingW64 compilationlhchavez2019-01-061-3/+11
| | | | It seems like MingW64's size_t is defined differently than in Linux.
* consistent header guardsethomson/header_guardsEdward Thomson2018-02-011-3/+3
| | | | use consistent names for the #include / #define header guard pattern.
* There is no "z" size specifier on MSVCSven Strickroth2014-10-131-0/+2
| | | | | | See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx and https://stackoverflow.com/questions/6655410/why-doesnt-zd-printf-format-work-in-vs2010 Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Introduce GIT_ALIGNJacques Germishuys2014-09-251-0/+8
|
* Include stdarg.h for the va_copy testEdward Thomson2014-02-241-0/+2
|
* Trying to fix Win32 warningsRussell Belfer2013-08-221-2/+6
|
* Fix gen_pktline format specifier for Win32Philip Kelley2013-01-221-0/+2
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* compat: va_copy on Win32 systemsVicent Martí2012-05-041-0/+8
|
* error-handling: ReferencesVicent Martí2012-03-061-0/+8
| | | | | Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
* Clean up GIT_UNUSED macros on all platformsRussell Belfer2012-03-021-2/+1
| | | | | | | | | | | | | | | | | | | It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5 did not fix the GIT_USUSED behavior on all platforms. This commit walks through and really cleans things up more thoroughly, getting rid of the unnecessary stuff. To remove the use of some GIT_UNUSED, I ended up adding a couple of new iterators for hashtables that allow you to iterator just over keys or just over values. In making this change, I found a bug in the clar tests (where we were doing *count++ but meant to do (*count)++ to increment the value). I fixed that but then found the test failing because it was not really using an empty repo. So, I took some of the code that I wrote for iterator testing and moved it to clar_helpers.c, then made use of that to make it easier to open fixtures on a per test basis even within a single test file.
* Simplify GIT_UNUSED macrosRussell Belfer2012-03-021-15/+2
| | | | | | | Since casting to void works to eliminate errors with unused parameters on all platforms, avoid the various special cases. Over time, it will make sense to eliminate the GIT_UNUSED macro completely and just have GIT_UNUSED_ARG.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* msvc: Properly handle inttypes.h/stdint.hVicent Marti2011-10-051-32/+23
|
* mingw: Fix compilation warningsVicent Marti2011-09-291-7/+0
|
* mingw: Fix printf identifiersVicent Marti2011-09-291-0/+7
|
* Tabify everythingVicent Marti2011-09-191-9/+9
| | | | | | There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
* Cleanup legal dataVicent Marti2011-09-191-1/+4
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* msvc: Disable a level 4 warning and change -W3 to -W4Ramsay Jones2010-06-071-0/+2
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* msvc: Fix some "unreferenced formal parameter" warningsRamsay Jones2010-01-201-0/+6
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Fix some "unused parameter" warnings with -WextraRamsay Jones2010-01-201-0/+10
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add support for the MinGW platformRamsay Jones2010-01-201-3/+3
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Disable some msvc "deprecated function" warnings againRamsay Jones2009-10-131-0/+6
| | | | | | | | | | | | | In addition to removing the inline #define, commit 209849a also removed a #pragma to disable msvc deprecated function warnings. Without this #pragma, msvc currently issues 19 warnings related to "deprecated insecure c-library functions", such as strcpy() and 22 warnings related to "deprecated POSIX function names", such as open(). In order to supress these warnings, re-instate the #pragma. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Use GIT_INLINE macro instead of keyword inline.Julio Espinoza-Sokal2009-06-161-8/+0
| | | | | | | | No need to define inline as __inline because libgit2 code should be using GIT_INLINE instead. Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
* win32: Add support for the MS Visual C/C++ compilerRamsay Jones2009-06-151-0/+24
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Correct the spelling of the FLEX_ARRAY macroRamsay Jones2009-06-151-6/+6
| | | | | | | | | | | | | | When setting the default value, the macro name was specified as GIT_FLEX_ARRAY, which is inconsistent with it's earlier usage in the file. This caused a compilation error, using the MS Visual C/C++ compiler, when compiling the git_packlist struct definition in src/odb.c. In addition to changing the spelling of the FLEX_ARRAY macro to GIT_FLEX_ARRAY, including it's use in src/odb.c, we also rename the TYPEOF macro to GIT_TYPEOF. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add cc-compat.h - C compiler compat macros for internal useAndreas Ericsson2008-11-221-0/+33
Holds things such as FLEX_ARRAY and whatnot. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>