public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] In <sys/types.h> optionally provide stdint.h types
@ 2022-05-04  8:10 Sebastian Huber
  2022-05-04  8:10 ` [PATCH 2/2] In <stdio.h> provide only necessary types Sebastian Huber
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Huber @ 2022-05-04  8:10 UTC (permalink / raw)
  To: newlib

Provide stdint.h types if BSD visibility is requested.
---
 newlib/libc/include/sys/types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 42e98ce97..9e858f1ce 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -48,6 +48,7 @@ typedef __intptr_t register_t;
 #if __BSD_VISIBLE
 #include <machine/endian.h>
 #include <sys/select.h>
+#include <sys/_stdint.h>
 #  define	physadr		physadr_t
 #  define	quad		quad_t
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] In <stdio.h> provide only necessary types
  2022-05-04  8:10 [PATCH 1/2] In <sys/types.h> optionally provide stdint.h types Sebastian Huber
@ 2022-05-04  8:10 ` Sebastian Huber
  2022-05-04 13:50   ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Huber @ 2022-05-04  8:10 UTC (permalink / raw)
  To: newlib

---
 newlib/libc/include/stdio.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
index 7748351f0..b995b56d2 100644
--- a/newlib/libc/include/stdio.h
+++ b/newlib/libc/include/stdio.h
@@ -58,7 +58,7 @@ typedef __gnuc_va_list va_list;
  */
 
 #include <sys/reent.h>
-#include <sys/types.h>
+#include <sys/_types.h>
 
 _BEGIN_STD_C
 
@@ -76,6 +76,16 @@ typedef _fpos64_t fpos64_t;
 #endif
 #endif /* !__CYGWIN__ */
 
+#ifndef _OFF_T_DECLARED
+typedef __off_t off_t;
+#define	_OFF_T_DECLARED
+#endif
+
+#ifndef _SSIZE_T_DECLARED
+typedef _ssize_t ssize_t;
+#define	_SSIZE_T_DECLARED
+#endif
+
 #include <sys/stdio.h>
 
 #define	__SLBF	0x0001		/* line buffered */
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] In <stdio.h> provide only necessary types
  2022-05-04  8:10 ` [PATCH 2/2] In <stdio.h> provide only necessary types Sebastian Huber
@ 2022-05-04 13:50   ` Corinna Vinschen
  0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2022-05-04 13:50 UTC (permalink / raw)
  To: newlib

On May  4 10:10, Sebastian Huber wrote:
> ---
>  newlib/libc/include/stdio.h | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

Patch 1 ignored, patch 2 pushed to replace my reverted one.


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-04 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04  8:10 [PATCH 1/2] In <sys/types.h> optionally provide stdint.h types Sebastian Huber
2022-05-04  8:10 ` [PATCH 2/2] In <stdio.h> provide only necessary types Sebastian Huber
2022-05-04 13:50   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).