<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat/nedmalloc/malloc.c.h, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-06T17:06:20Z</updated>
<entry>
<title>unify and bump _WIN32_WINNT definition to Windows 8.1</title>
<updated>2026-04-06T17:06:20Z</updated>
<author>
<name>Matthias Aßhauer</name>
<email>mha1993@live.de</email>
</author>
<published>2026-04-06T05:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66dd13f3f72e8cad1327b6b134dec079936c4b07'/>
<id>urn:sha1:66dd13f3f72e8cad1327b6b134dec079936c4b07</id>
<content type='text'>
Git for Windows doesn't support anything prior to Windows 8.1 since 2.47.0
and Git followed along with commits like ce6ccba (mingw: drop Windows
7-specific work-around, 2025-08-04).

There is no need to pretend to the compiler that we still support Windows
Vista, just to lock us out of easy access to newer APIs. There is also no
need to have conflicting and unused definitions claiming we support some
versions of Windows XP or even Windows NT 4.0.

Bump all definitions of _WIN32_WINNT to a realistic value of Windows 8.1.
This will also simplify code for a followup commit that will improve cpu
core detection on multi-socket systems.

Signed-off-by: Matthias Aßhauer &lt;mha1993@live.de&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix spelling errors in no-longer-updated-from-upstream modules</title>
<updated>2019-11-10T07:00:55Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=03670c8b2375062a5bcc50ce8891a4406fbc88e2'/>
<id>urn:sha1:03670c8b2375062a5bcc50ce8891a4406fbc88e2</id>
<content type='text'>
We have several modules originally taken from some upstream source,
and which as far as I can tell we no longer update from the upstream
anymore.  As such, I have not submitted these spelling fixes to any
external projects but just include them directly here.

Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: avoid compiler warning about unused value</title>
<updated>2019-08-07T18:54:55Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-08-07T13:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=70597e838601ee6be5c43ece255c9df47f8fe9a2'/>
<id>urn:sha1:70597e838601ee6be5c43ece255c9df47f8fe9a2</id>
<content type='text'>
Cast the evaluated value of the macro INITIAL_LOCK to void to instruct
the compiler that we're not interested in said value nor the following
warning:

In file included from compat/nedmalloc/nedmalloc.c:63:
compat/nedmalloc/malloc.c.h: In function ‘init_user_mstate’:
compat/nedmalloc/malloc.c.h:1706:62: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 1706 | #define INITIAL_LOCK(sl)      (memset(sl, 0, sizeof(MLOCK_T)), 0)
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
compat/nedmalloc/malloc.c.h:5020:3: note: in expansion of macro ‘INITIAL_LOCK’
 5020 |   INITIAL_LOCK(&amp;m-&gt;mutex);
      |   ^~~~~~~~~~~~

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: do assignments only after the declaration section</title>
<updated>2019-08-07T18:54:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-08-07T13:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c9b9c09dae175f75bed4363cc6278c3f0cb3b9dd'/>
<id>urn:sha1:c9b9c09dae175f75bed4363cc6278c3f0cb3b9dd</id>
<content type='text'>
Avoid the following compiler warning:

In file included from compat/nedmalloc/nedmalloc.c:63:
compat/nedmalloc/malloc.c.h: In function ‘pthread_release_lock’:
compat/nedmalloc/malloc.c.h:1759:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 1759 |     volatile unsigned int* lp = &amp;sl-&gt;l;
      |     ^~~~~~~~

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: uglify (a, 0) definitions to shut up warnings</title>
<updated>2016-01-15T22:02:39Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-15T13:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2921600afbcdd5f245475602cabba2fbaa5ff93f'/>
<id>urn:sha1:2921600afbcdd5f245475602cabba2fbaa5ff93f</id>
<content type='text'>
When the result of a (a, 0) expression is not used, MSys2's GCC version
finds it necessary to complain with a warning:

	right-hand operand of comma expression has no effect

Let's just pretend to use the 0 value and have a peaceful and quiet life
again.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: allow compiling with MSys2's compiler</title>
<updated>2016-01-14T20:20:33Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-14T16:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e2af084d4326ea2b1192074fb1d1ccefe0016a3'/>
<id>urn:sha1:9e2af084d4326ea2b1192074fb1d1ccefe0016a3</id>
<content type='text'>
With MSys2's GCC, `ReadWriteBarrier` is already defined, and FORCEINLINE
unfortunately gets defined incorrectly.

Let's work around both problems, using the MSys2-specific
__MINGW64_VERSION_MAJOR constant to guard the FORCEINLINE definition so
as not to affect other platforms.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Windows: do not redefine _WIN32_WINNT</title>
<updated>2013-09-11T21:50:19Z</updated>
<author>
<name>Sebastian Schuberth</name>
<email>sschuberth@gmail.com</email>
</author>
<published>2013-09-11T16:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8453c1259a3b6fe89d67b6e783cc535b60f298c1'/>
<id>urn:sha1:8453c1259a3b6fe89d67b6e783cc535b60f298c1</id>
<content type='text'>
With MinGW runtime version 4.0 this interferes with the previous
definition from sdkddkver.h.

Signed-off-by: Sebastian Schuberth &lt;sschuberth@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>typofix: in-code comments</title>
<updated>2013-07-22T23:06:49Z</updated>
<author>
<name>Ondřej Bílka</name>
<email>neleai@seznam.cz</email>
</author>
<published>2013-07-22T21:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=749f763dbbe4dbcc4082f02bf98bfc1a09427c6f'/>
<id>urn:sha1:749f763dbbe4dbcc4082f02bf98bfc1a09427c6f</id>
<content type='text'>
Signed-off-by: Ondřej Bílka &lt;neleai@seznam.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat/nedmalloc: Fix compiler warnings on linux</title>
<updated>2013-04-28T19:26:09Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-04-27T18:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eec7fd8bc54eacf96d0988741a0d988f374c4db9'/>
<id>urn:sha1:eec7fd8bc54eacf96d0988741a0d988f374c4db9</id>
<content type='text'>
On linux, when the build variable USE_NED_ALLOCATOR is set, gcc
issues the following warnings:

    In file included from compat/nedmalloc/nedmalloc.c:63:
    .../malloc.c.h: In function 'mmap_resize':
    .../malloc.c.h:3762: warning: implicit declaration of function 'mremap'
    .../malloc.c.h: In function 'sys_trim':
    .../malloc.c.h:4195: warning: comparison between pointer and integer

The warnings are caused by the &lt;sys/mman.h&gt; header not enabling the
(conditional) declaration of the mremap() function.  The declaration
can be enabled by defining the _GNU_SOURCE symbol prior to including
certain system header files. In particular, it may not be sufficient
to simply define _GNU_SOURCE just prior to including the &lt;sys/mman.h&gt;
header. (e.g. defining the symbol after including &lt;sys/types.h&gt; will
be completely ineffective.)

In order to suppress the warnings, we define the _GNU_SOURCE symbol
at the start of the malloc.c.h header file.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat/nedmalloc: Fix some sparse warnings</title>
<updated>2013-04-28T19:24:48Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-04-27T18:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=241c957d899fe829bf5754e8589e357ce9496783'/>
<id>urn:sha1:241c957d899fe829bf5754e8589e357ce9496783</id>
<content type='text'>
Sparse issues many "Using plain integer as NULL pointer" warnings
while checking nedmalloc.c (at least 98 such warnings before giving
up due to "too many warnings"). In addition, sparse issues some
"non-ANSI function declaration" type warnings for the symbols
'win32_getcurrentthreadid', 'malloc_stats' and 'malloc_footprint'.

In order to suppress the NULL pointer warnings, rather than replace
all uses of '0' as a null pointer representation with NULL, we add
-Wno-non-pointer-null to SPARSE_FLAGS while checking nedmalloc.c.

In order to suppress the "non-ANSI function declaration" warnings,
we simply include the missing 'empty parameter list' prototype (void)
in the function declarations.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
