shithub: scc

Download patch

ref: 67f14db0cfed811698a6f42f0e6eab5a2f88911f
parent: cfbc2aa99a9b694a4a89557be5f8350bfa7aec8a
author: Quentin Rameau <[email protected]>
date: Fri Mar 10 05:21:34 EST 2017

[libc] Fix ptrdiff_t definition signedness

--- a/libc/include/bits/amd64-sysv/arch/stddef.h
+++ b/libc/include/bits/amd64-sysv/arch/stddef.h
@@ -11,6 +11,6 @@
 #endif
 
 #ifndef _PTRDIFF_T
-typedef unsigned long ptrdiff_t;
+typedef long ptrdiff_t;
 #define _PTRDIFF_T
 #endif
--- a/libc/include/bits/i386-sysv/arch/stddef.h
+++ b/libc/include/bits/i386-sysv/arch/stddef.h
@@ -11,6 +11,6 @@
 #endif
 
 #ifndef _PTRDIFF_T
-typedef unsigned long ptrdiff_t;
+typedef long ptrdiff_t;
 #define _PTRDIFF_T
 #endif
--- a/libc/include/bits/qbe/arch/stddef.h
+++ b/libc/include/bits/qbe/arch/stddef.h
@@ -11,6 +11,6 @@
 #endif
 
 #ifndef _PTRDIFF_T
-typedef unsigned long ptrdiff_t;
+typedef long ptrdiff_t;
 #define _PTRDIFF_T
 #endif
--- a/libc/include/bits/z80/arch/stddef.h
+++ b/libc/include/bits/z80/arch/stddef.h
@@ -11,6 +11,6 @@
 #endif
 
 #ifndef _PTRDIFF_T
-typedef unsigned short ptrdiff_t;
+typedef short ptrdiff_t;
 #define _PTRDIFF_T
 #endif