* [PATCH 2/2] Provide <memory.h>
2016-11-22 6:59 [PATCH 1/2] Declare non-standard pthread_yield() Sebastian Huber
@ 2016-11-22 6:59 ` Sebastian Huber
2016-11-22 15:49 ` Eric Blake
2016-11-22 15:59 ` Corinna Vinschen
0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Huber @ 2016-11-22 6:59 UTC (permalink / raw)
To: newlib; +Cc: Sebastian Huber
Provide <memory.h> for all standard Newlib targets and remove
Cygwin-specific header. Most POSIX like systems provide this historic
header.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
newlib/libc/include/memory.h | 4 ++++
winsup/cygwin/include/memory.h | 15 ---------------
2 files changed, 4 insertions(+), 15 deletions(-)
create mode 100644 newlib/libc/include/memory.h
delete mode 100644 winsup/cygwin/include/memory.h
diff --git a/newlib/libc/include/memory.h b/newlib/libc/include/memory.h
new file mode 100644
index 0000000..f4a14fc
--- /dev/null
+++ b/newlib/libc/include/memory.h
@@ -0,0 +1,4 @@
+#ifndef _MEMORY_H
+#define _MEMORY_H
+#include <string.h>
+#endif /* !_MEMORY_H */
diff --git a/winsup/cygwin/include/memory.h b/winsup/cygwin/include/memory.h
deleted file mode 100644
index 42370a9..0000000
--- a/winsup/cygwin/include/memory.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* memory.h
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MEMORY_H
-#define _MEMORY_H
-
-/* This allows more things to compile. */
-#include <string.h>
-
-#endif /* _MEMORY_H */
--
1.8.4.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] Declare non-standard pthread_yield()
@ 2016-11-22 6:59 Sebastian Huber
2016-11-22 6:59 ` [PATCH 2/2] Provide <memory.h> Sebastian Huber
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Huber @ 2016-11-22 6:59 UTC (permalink / raw)
To: newlib; +Cc: Sebastian Huber
The non-standard pthread_yield() function is available at least on
Cygwin, FreeBSD and glibc.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
newlib/libc/include/pthread.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
index abba3d9..46f5420 100644
--- a/newlib/libc/include/pthread.h
+++ b/newlib/libc/include/pthread.h
@@ -278,6 +278,10 @@ int _EXFUN(pthread_getcpuclockid,
int _EXFUN(pthread_setconcurrency, (int new_level));
int _EXFUN(pthread_getconcurrency, (void));
+#if __BSD_VISIBLE || __GNU_VISIBLE
+void _EXFUN(pthread_yield, (void));
+#endif
+
/* Dynamic Package Initialization */
/* This is used to statically initialize a pthread_once_t. Example:
--
1.8.4.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Provide <memory.h>
2016-11-22 6:59 ` [PATCH 2/2] Provide <memory.h> Sebastian Huber
@ 2016-11-22 15:49 ` Eric Blake
2016-11-22 16:00 ` Corinna Vinschen
2016-11-22 15:59 ` Corinna Vinschen
1 sibling, 1 reply; 5+ messages in thread
From: Eric Blake @ 2016-11-22 15:49 UTC (permalink / raw)
To: Sebastian Huber, newlib
[-- Attachment #1.1: Type: text/plain, Size: 1084 bytes --]
On 11/22/2016 12:59 AM, Sebastian Huber wrote:
> Provide <memory.h> for all standard Newlib targets and remove
> Cygwin-specific header. Most POSIX like systems provide this historic
> header.
>
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
> newlib/libc/include/memory.h | 4 ++++
> winsup/cygwin/include/memory.h | 15 ---------------
> 2 files changed, 4 insertions(+), 15 deletions(-)
> create mode 100644 newlib/libc/include/memory.h
> delete mode 100644 winsup/cygwin/include/memory.h
>
> diff --git a/newlib/libc/include/memory.h b/newlib/libc/include/memory.h
> new file mode 100644
> index 0000000..f4a14fc
> --- /dev/null
> +++ b/newlib/libc/include/memory.h
> @@ -0,0 +1,4 @@
> +#ifndef _MEMORY_H
> +#define _MEMORY_H
> +#include <string.h>
> +#endif /* !_MEMORY_H */
Would it be worth adding
#warn This header is deprecated; consider using <string.h>
to get people to modernize their code?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Provide <memory.h>
2016-11-22 6:59 ` [PATCH 2/2] Provide <memory.h> Sebastian Huber
2016-11-22 15:49 ` Eric Blake
@ 2016-11-22 15:59 ` Corinna Vinschen
1 sibling, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2016-11-22 15:59 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 291 bytes --]
On Nov 22 07:59, Sebastian Huber wrote:
> Provide <memory.h> for all standard Newlib targets and remove
> Cygwin-specific header. Most POSIX like systems provide this historic
> header.
Both patches applied.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Provide <memory.h>
2016-11-22 15:49 ` Eric Blake
@ 2016-11-22 16:00 ` Corinna Vinschen
0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2016-11-22 16:00 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]
On Nov 22 09:49, Eric Blake wrote:
> On 11/22/2016 12:59 AM, Sebastian Huber wrote:
> > Provide <memory.h> for all standard Newlib targets and remove
> > Cygwin-specific header. Most POSIX like systems provide this historic
> > header.
> >
> > Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> > ---
> > newlib/libc/include/memory.h | 4 ++++
> > winsup/cygwin/include/memory.h | 15 ---------------
> > 2 files changed, 4 insertions(+), 15 deletions(-)
> > create mode 100644 newlib/libc/include/memory.h
> > delete mode 100644 winsup/cygwin/include/memory.h
> >
> > diff --git a/newlib/libc/include/memory.h b/newlib/libc/include/memory.h
> > new file mode 100644
> > index 0000000..f4a14fc
> > --- /dev/null
> > +++ b/newlib/libc/include/memory.h
> > @@ -0,0 +1,4 @@
> > +#ifndef _MEMORY_H
> > +#define _MEMORY_H
> > +#include <string.h>
> > +#endif /* !_MEMORY_H */
>
> Would it be worth adding
>
> #warn This header is deprecated; consider using <string.h>
>
> to get people to modernize their code?
Nice idea, but glibc is not doing that either...
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-22 16:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 6:59 [PATCH 1/2] Declare non-standard pthread_yield() Sebastian Huber
2016-11-22 6:59 ` [PATCH 2/2] Provide <memory.h> Sebastian Huber
2016-11-22 15:49 ` Eric Blake
2016-11-22 16:00 ` Corinna Vinschen
2016-11-22 15:59 ` 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).