970-add___kernel_long_and___kernel_ulong.patch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. From 6a76edddaa62ff06f178143b582167734cb55c18 Mon Sep 17 00:00:00 2001
  2. From: Chris Packham <chris.packham@alliedtelesis.co.nz>
  3. Date: Mon, 01 Oct 2012 05:12:54 +0000
  4. Subject: libc/sysdeps: add __kernel_long and __kernel_ulong
  5. Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various
  6. exported header files were updated to use these new types. Add the
  7. definitions for __kernel_long_t and __kernel_ulong_t to the relevant
  8. kernel_types.h headers.
  9. This change was automated with the following scriptlet
  10. git grep --name-only 'typedef.*__kernel_old_dev_t' \
  11. | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\
  12. typedef long\t\t__kernel_long_t;\
  13. typedef unsigned long\t__kernel_ulong_t;'
  14. Whitespace in arm, avr32, hppa, sparc was then manually fixed up.
  15. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
  16. --
  17. Here's a cleaned up patch which should get the whitespace right. I'm a
  18. bit iffy about the sparc changes they make sense to me but it's not a
  19. platform I have access to.
  20. I can break this up per arch or per maintainer if requested.
  21. libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++
  22. libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++
  23. libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++
  24. libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++
  25. libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++
  26. libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++
  27. libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++
  28. libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++
  29. libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++
  30. libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++
  31. libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++
  32. libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++
  33. libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++
  34. libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++
  35. libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++
  36. libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++
  37. libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++
  38. libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++
  39. libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++
  40. libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++
  41. libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++
  42. libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++
  43. 22 files changed, 50 insertions(+)
  44. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  45. ---
  46. --- a/libc/sysdeps/linux/alpha/bits/kernel_types.h
  47. +++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h
  48. @@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_
  49. typedef __kernel_uid_t __kernel_uid32_t;
  50. typedef __kernel_gid_t __kernel_gid32_t;
  51. typedef __kernel_dev_t __kernel_old_dev_t;
  52. +typedef long __kernel_long_t;
  53. +typedef unsigned long __kernel_ulong_t;
  54. typedef struct {
  55. int val[2];
  56. --- a/libc/sysdeps/linux/arm/bits/kernel_types.h
  57. +++ b/libc/sysdeps/linux/arm/bits/kernel_types.h
  58. @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid
  59. typedef unsigned short __kernel_old_gid_t;
  60. typedef long long __kernel_loff_t;
  61. typedef __kernel_dev_t __kernel_old_dev_t;
  62. +typedef long __kernel_long_t;
  63. +typedef unsigned long __kernel_ulong_t;
  64. typedef struct {
  65. #ifdef __USE_ALL
  66. --- a/libc/sysdeps/linux/avr32/bits/kernel_types.h
  67. +++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h
  68. @@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t;
  69. typedef unsigned short __kernel_old_uid_t;
  70. typedef unsigned short __kernel_old_gid_t;
  71. typedef unsigned short __kernel_old_dev_t;
  72. +typedef long __kernel_long_t;
  73. +typedef unsigned long __kernel_ulong_t;
  74. #ifdef __GNUC__
  75. typedef long long __kernel_loff_t;
  76. --- a/libc/sysdeps/linux/bfin/bits/kernel_types.h
  77. +++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h
  78. @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_
  79. typedef unsigned short __kernel_old_gid_t;
  80. typedef long long __kernel_loff_t;
  81. typedef __kernel_dev_t __kernel_old_dev_t;
  82. +typedef long __kernel_long_t;
  83. +typedef unsigned long __kernel_ulong_t;
  84. typedef struct {
  85. #ifdef __USE_ALL
  86. --- a/libc/sysdeps/linux/c6x/bits/kernel_types.h
  87. +++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h
  88. @@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t;
  89. typedef unsigned int __kernel_old_uid_t;
  90. typedef unsigned int __kernel_old_gid_t;
  91. typedef unsigned int __kernel_old_dev_t;
  92. +typedef long __kernel_long_t;
  93. +typedef unsigned long __kernel_ulong_t;
  94. typedef unsigned int __kernel_size_t;
  95. typedef int __kernel_ssize_t;
  96. typedef int __kernel_ptrdiff_t;
  97. --- a/libc/sysdeps/linux/cris/bits/kernel_types.h
  98. +++ b/libc/sysdeps/linux/cris/bits/kernel_types.h
  99. @@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t
  100. typedef unsigned short __kernel_old_uid_t;
  101. typedef unsigned short __kernel_old_gid_t;
  102. typedef __kernel_dev_t __kernel_old_dev_t;
  103. +typedef long __kernel_long_t;
  104. +typedef unsigned long __kernel_ulong_t;
  105. #ifdef __GNUC__
  106. typedef long long __kernel_loff_t;
  107. --- a/libc/sysdeps/linux/e1/bits/kernel_types.h
  108. +++ b/libc/sysdeps/linux/e1/bits/kernel_types.h
  109. @@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t;
  110. typedef unsigned short __kernel_old_uid_t;
  111. typedef unsigned short __kernel_old_gid_t;
  112. typedef __kernel_dev_t __kernel_old_dev_t;
  113. +typedef long __kernel_long_t;
  114. +typedef unsigned long __kernel_ulong_t;
  115. typedef long long __kernel_loff_t;
  116. /*
  117. --- a/libc/sysdeps/linux/h8300/bits/kernel_types.h
  118. +++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h
  119. @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_
  120. typedef unsigned short __kernel_old_gid_t;
  121. typedef long long __kernel_loff_t;
  122. typedef __kernel_dev_t __kernel_old_dev_t;
  123. +typedef long __kernel_long_t;
  124. +typedef unsigned long __kernel_ulong_t;
  125. typedef struct {
  126. #ifdef __USE_ALL
  127. --- a/libc/sysdeps/linux/hppa/bits/kernel_types.h
  128. +++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h
  129. @@ -45,6 +45,8 @@ typedef long long __kernel_off64_t;
  130. typedef unsigned long long __kernel_ino64_t;
  131. typedef unsigned int __kernel_old_dev_t;
  132. +typedef long __kernel_long_t;
  133. +typedef unsigned long __kernel_ulong_t;
  134. typedef struct {
  135. #ifdef __USE_ALL
  136. --- a/libc/sysdeps/linux/i386/bits/kernel_types.h
  137. +++ b/libc/sysdeps/linux/i386/bits/kernel_types.h
  138. @@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t;
  139. typedef unsigned short __kernel_old_uid_t;
  140. typedef unsigned short __kernel_old_gid_t;
  141. typedef __kernel_dev_t __kernel_old_dev_t;
  142. +typedef long __kernel_long_t;
  143. +typedef unsigned long __kernel_ulong_t;
  144. typedef long long __kernel_loff_t;
  145. typedef struct {
  146. --- a/libc/sysdeps/linux/ia64/bits/kernel_types.h
  147. +++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h
  148. @@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t;
  149. typedef unsigned int __kernel_dev_t;
  150. typedef unsigned int __kernel_old_dev_t;
  151. +typedef long __kernel_long_t;
  152. +typedef unsigned long __kernel_ulong_t;
  153. #endif /* _ASM_IA64_POSIX_TYPES_H */
  154. --- a/libc/sysdeps/linux/m68k/bits/kernel_types.h
  155. +++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h
  156. @@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_
  157. typedef unsigned short __kernel_old_gid_t;
  158. typedef long long __kernel_loff_t;
  159. typedef __kernel_dev_t __kernel_old_dev_t;
  160. +typedef long __kernel_long_t;
  161. +typedef unsigned long __kernel_ulong_t;
  162. typedef struct {
  163. #ifdef __USE_ALL
  164. --- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h
  165. +++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
  166. @@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t;
  167. typedef unsigned int __kernel_old_uid_t;
  168. typedef unsigned int __kernel_old_gid_t;
  169. typedef unsigned int __kernel_old_dev_t;
  170. +typedef long __kernel_long_t;
  171. +typedef unsigned long __kernel_ulong_t;
  172. #ifdef __GNUC__
  173. typedef long long __kernel_loff_t;
  174. --- a/libc/sysdeps/linux/mips/bits/kernel_types.h
  175. +++ b/libc/sysdeps/linux/mips/bits/kernel_types.h
  176. @@ -32,6 +32,8 @@ typedef int __kernel_gid32_t;
  177. typedef __kernel_uid_t __kernel_old_uid_t;
  178. typedef __kernel_gid_t __kernel_old_gid_t;
  179. typedef __kernel_dev_t __kernel_old_dev_t;
  180. +typedef long __kernel_long_t;
  181. +typedef unsigned long __kernel_ulong_t;
  182. typedef long long __kernel_loff_t;
  183. #else
  184. typedef unsigned int __kernel_dev_t;
  185. @@ -68,6 +70,8 @@ typedef int __kernel_gid32_t;
  186. typedef __kernel_uid_t __kernel_old_uid_t;
  187. typedef __kernel_gid_t __kernel_old_gid_t;
  188. typedef __kernel_dev_t __kernel_old_dev_t;
  189. +typedef long __kernel_long_t;
  190. +typedef unsigned long __kernel_ulong_t;
  191. typedef long long __kernel_loff_t;
  192. #endif
  193. --- a/libc/sysdeps/linux/nios2/bits/kernel_types.h
  194. +++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h
  195. @@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t;
  196. typedef unsigned short __kernel_old_uid_t;
  197. typedef unsigned short __kernel_old_gid_t;
  198. typedef unsigned short __kernel_old_dev_t;
  199. +typedef long __kernel_long_t;
  200. +typedef unsigned long __kernel_ulong_t;
  201. typedef long long __kernel_loff_t;
  202. typedef struct {
  203. --- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h
  204. +++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h
  205. @@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t;
  206. typedef unsigned int __kernel_old_uid_t;
  207. typedef unsigned int __kernel_old_gid_t;
  208. typedef __kernel_dev_t __kernel_old_dev_t;
  209. +typedef long __kernel_long_t;
  210. +typedef unsigned long __kernel_ulong_t;
  211. #else
  212. typedef unsigned int __kernel_dev_t;
  213. typedef unsigned int __kernel_ino_t;
  214. @@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t;
  215. typedef unsigned int __kernel_old_uid_t;
  216. typedef unsigned int __kernel_old_gid_t;
  217. typedef __kernel_dev_t __kernel_old_dev_t;
  218. +typedef long __kernel_long_t;
  219. +typedef unsigned long __kernel_ulong_t;
  220. typedef long long __kernel_loff_t;
  221. #endif
  222. --- a/libc/sysdeps/linux/sh/bits/kernel_types.h
  223. +++ b/libc/sysdeps/linux/sh/bits/kernel_types.h
  224. @@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t;
  225. typedef unsigned short __kernel_old_uid_t;
  226. typedef unsigned short __kernel_old_gid_t;
  227. typedef __kernel_dev_t __kernel_old_dev_t;
  228. +typedef long __kernel_long_t;
  229. +typedef unsigned long __kernel_ulong_t;
  230. typedef long long __kernel_loff_t;
  231. typedef struct {
  232. --- a/libc/sysdeps/linux/sh64/bits/kernel_types.h
  233. +++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h
  234. @@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t
  235. typedef unsigned short __kernel_old_uid_t;
  236. typedef unsigned short __kernel_old_gid_t;
  237. typedef __kernel_dev_t __kernel_old_dev_t;
  238. +typedef long __kernel_long_t;
  239. +typedef unsigned long __kernel_ulong_t;
  240. typedef long long __kernel_loff_t;
  241. typedef struct {
  242. --- a/libc/sysdeps/linux/sparc/bits/kernel_types.h
  243. +++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h
  244. @@ -32,6 +32,8 @@ typedef unsigned short __kernel_g
  245. typedef __kernel_uid_t __kernel_old_uid_t;
  246. typedef __kernel_gid_t __kernel_old_gid_t;
  247. typedef __kernel_dev_t __kernel_old_dev_t;
  248. +typedef long __kernel_long_t;
  249. +typedef unsigned long __kernel_ulong_t;
  250. typedef __kernel_uid_t __kernel_uid32_t;
  251. typedef __kernel_gid_t __kernel_gid32_t;
  252. typedef int __kernel_suseconds_t;
  253. @@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid
  254. typedef unsigned short __kernel_old_uid_t;
  255. typedef unsigned short __kernel_old_gid_t;
  256. typedef __kernel_dev_t __kernel_old_dev_t;
  257. +typedef long __kernel_long_t;
  258. +typedef unsigned long __kernel_ulong_t;
  259. typedef long long __kernel_loff_t;
  260. #endif
  261. --- a/libc/sysdeps/linux/v850/bits/kernel_types.h
  262. +++ b/libc/sysdeps/linux/v850/bits/kernel_types.h
  263. @@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t;
  264. typedef unsigned short __kernel_old_uid_t;
  265. typedef unsigned short __kernel_old_gid_t;
  266. typedef __kernel_dev_t __kernel_old_dev_t;
  267. +typedef long __kernel_long_t;
  268. +typedef unsigned long __kernel_ulong_t;
  269. typedef struct {
  270. #ifdef __USE_ALL
  271. --- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h
  272. +++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h
  273. @@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t;
  274. typedef unsigned short __kernel_old_uid_t;
  275. typedef unsigned short __kernel_old_gid_t;
  276. typedef __kernel_dev_t __kernel_old_dev_t;
  277. +typedef long __kernel_long_t;
  278. +typedef unsigned long __kernel_ulong_t;
  279. typedef long long __kernel_loff_t;
  280. typedef struct {
  281. --- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h
  282. +++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h
  283. @@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t;
  284. typedef unsigned short __kernel_old_uid_t;
  285. typedef unsigned short __kernel_old_gid_t;
  286. typedef unsigned short __kernel_old_dev_t;
  287. +typedef long __kernel_long_t;
  288. +typedef unsigned long __kernel_ulong_t;
  289. typedef long long __kernel_loff_t;
  290. /* Beginning in 2.6 kernels, which is the first version that includes the