[1/8] Move inttypes.h and stdint.h to stdlib.

Message ID 8599cb1bbabc34c9a06c26443158fcf576e61efb.1552315664.git.zackw@panix.com
State Superseded
Headers

Commit Message

Zack Weinberg March 11, 2019, 2:59 p.m. UTC
  inttypes.h and stdint.h are in sysdeps/generic, but there are no other
versions of these headers anywhere in the source tree, so they aren’t
actually system-dependent.  Move them to the subdirectory that
installs them (stdlib).

	* sysdeps/generic/inttypes.h, sysdeps/generic/stdint.h:
	Move to stdlib.
	* include/inttypes.h: Adjust to match.
	* include/stdint.h: New wrapper.
---
 include/inttypes.h                     | 2 +-
 include/stdint.h                       | 1 +
 {sysdeps/generic => stdlib}/inttypes.h | 0
 {sysdeps/generic => stdlib}/stdint.h   | 0
 4 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 include/stdint.h
 rename {sysdeps/generic => stdlib}/inttypes.h (100%)
 rename {sysdeps/generic => stdlib}/stdint.h (100%)
  

Comments

Joseph Myers March 11, 2019, 11:19 p.m. UTC | #1
On Mon, 11 Mar 2019, Zack Weinberg wrote:

> inttypes.h and stdint.h are in sysdeps/generic, but there are no other
> versions of these headers anywhere in the source tree, so they aren’t
> actually system-dependent.  Move them to the subdirectory that
> installs them (stdlib).
> 
> 	* sysdeps/generic/inttypes.h, sysdeps/generic/stdint.h:
> 	Move to stdlib.
> 	* include/inttypes.h: Adjust to match.
> 	* include/stdint.h: New wrapper.

OK.  (Any system dependencies in these files ought to be handled via 
bits/* headers.)
  
Zack Weinberg March 13, 2019, 1:46 p.m. UTC | #2
On Mon, Mar 11, 2019 at 7:19 PM Joseph Myers <joseph@codesourcery.com> wrote:
> On Mon, 11 Mar 2019, Zack Weinberg wrote:
> > inttypes.h and stdint.h are in sysdeps/generic, but there are no other
> > versions of these headers anywhere in the source tree, so they aren’t
> > actually system-dependent.  Move them to the subdirectory that
> > installs them (stdlib).
>
> OK.  (Any system dependencies in these files ought to be handled via
> bits/* headers.)

Committed.

zw
  

Patch

diff --git a/include/inttypes.h b/include/inttypes.h
index 33219e2a9f..3a583c6c07 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -1,5 +1,5 @@ 
 #ifndef _INTTYPES_H
-#include_next <inttypes.h>
+#include <stdlib/inttypes.h>
 #ifndef _ISOMAC
 libc_hidden_proto (strtoumax)
 #endif
diff --git a/include/stdint.h b/include/stdint.h
new file mode 100644
index 0000000000..7f428741d7
--- /dev/null
+++ b/include/stdint.h
@@ -0,0 +1 @@ 
+#include <stdlib/stdint.h>
diff --git a/sysdeps/generic/inttypes.h b/stdlib/inttypes.h
similarity index 100%
rename from sysdeps/generic/inttypes.h
rename to stdlib/inttypes.h
diff --git a/sysdeps/generic/stdint.h b/stdlib/stdint.h
similarity index 100%
rename from sysdeps/generic/stdint.h
rename to stdlib/stdint.h