mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
4.8 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/hannes/embutils/gcc34-regparm.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./buffer.c.orig 2004-09-13 04:25:26.764451104 +0200
  20. +++ ./buffer.c 2004-09-13 04:27:42.202861336 +0200
  21. @@ -6,15 +6,6 @@
  22. int (*op)();
  23. } buffer;
  24. -#ifdef __i386__
  25. -int buffer_flush(buffer* b) __attribute__((regparm(1)));
  26. -int buffer_putc(buffer *b,char c) __attribute__((regparm(2)));
  27. -int buffer_puts(buffer *b,const char* s) __attribute__((regparm(2)));
  28. -int buffer_put(buffer *b,char* s,int len) __attribute__((regparm(2)));
  29. -int buffer_putulong(buffer *b,unsigned long l) __attribute__((regparm(2)));
  30. -static int buffer_putnlflush(buffer* b) __attribute__((regparm(1)));
  31. -#endif
  32. -
  33. #define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) }
  34. #define BUFFER_INSIZE 8192
  35. #define BUFFER_OUTSIZE 8192
  36. @@ -31,27 +22,27 @@
  37. buffer *buffer_2 = &it2;
  38. #endif
  39. -int buffer_flush(buffer* b) {
  40. +int __attribute__((regparm(1))) buffer_flush(buffer* b) {
  41. register int p;
  42. if (!(p=b->p)) return 0;
  43. b->p=0;
  44. return b->op(b->fd,b->x,p);
  45. }
  46. -int buffer_putc(buffer *b,char c) {
  47. +int __attribute__((regparm(2))) buffer_putc(buffer *b,char c) {
  48. if (b->p>=b->n) if (buffer_flush(b)<0) return -1;
  49. b->x[b->p++]=c;
  50. return 0;
  51. }
  52. -int buffer_puts(buffer *b,const char* s) {
  53. +int __attribute__((regparm(2))) buffer_puts(buffer *b,const char* s) {
  54. for (; *s; ++s)
  55. if (buffer_putc(b,*s)<0) return -1;
  56. return 0;
  57. }
  58. #ifndef DONT_NEED_PUT
  59. -int buffer_put(buffer *b,char* s,int len) {
  60. +int __attribute__((regparm(2))) buffer_put(buffer *b,char* s,int len) {
  61. int i;
  62. for (i=0; i<len; ++i)
  63. if (buffer_putc(b,s[i])<0) return -1;
  64. @@ -60,13 +51,13 @@
  65. #endif
  66. #ifndef DONT_NEED_PUTULONG
  67. -int buffer_putulong(buffer *b,unsigned long l) {
  68. +int __attribute__((regparm(2))) buffer_putulong(buffer *b,unsigned long l) {
  69. char buf[50];
  70. return buffer_put(b,buf,fmt_ulong(buf,l));
  71. }
  72. #endif
  73. -static int buffer_putnlflush(buffer* b) {
  74. +static int __attribute__((regparm(1))) buffer_putnlflush(buffer* b) {
  75. buffer_putc(b,'\n');
  76. buffer_flush(b);
  77. }
  78. --- ./fmt_8long.c.orig 2004-09-13 04:28:57.283447352 +0200
  79. +++ ./fmt_8long.c 2004-09-13 04:29:09.751551912 +0200
  80. @@ -1,8 +1,5 @@
  81. -#ifdef __i386__
  82. -unsigned int fmt_8long(char *dest,unsigned long i) __attribute__((regparm(2)));
  83. -#endif
  84. -unsigned int fmt_8long(char *dest,unsigned long i) {
  85. +unsigned int __attribute__((regparm(2))) fmt_8long(char *dest,unsigned long i) {
  86. register unsigned long len,tmp,len2;
  87. for (len=1, tmp=i; tmp>7; ++len) tmp/=8;
  88. if (dest)
  89. --- ./fmt_str.c.orig 2004-09-13 04:27:54.884933368 +0200
  90. +++ ./fmt_str.c 2004-09-13 04:28:14.362972256 +0200
  91. @@ -1,8 +1,5 @@
  92. -#ifdef __i386__
  93. -unsigned int fmt_str(char *dest,const char* in) __attribute__((regparm(2)));
  94. -#endif
  95. -unsigned int fmt_str(char *out,const char *in) {
  96. +unsigned int __attribute__((regparm(2))) fmt_str(char *out,const char *in) {
  97. register char* s=out;
  98. register const char* t=in;
  99. for (;;) {
  100. --- ./fmt_ulong.c.orig 2004-09-13 04:28:28.835772056 +0200
  101. +++ ./fmt_ulong.c 2004-09-13 04:28:48.251820368 +0200
  102. @@ -1,8 +1,5 @@
  103. -#ifdef __i386__
  104. -unsigned int fmt_ulong(char *dest,unsigned long i) __attribute__((regparm(2)));
  105. -#endif
  106. -unsigned int fmt_ulong(char *dest,unsigned long i) {
  107. +unsigned int __attribute__((regparm(2))) fmt_ulong(char *dest,unsigned long i) {
  108. register unsigned long len,tmp,len2;
  109. for (len=1, tmp=i; tmp>9; ++len) tmp/=10;
  110. if (dest)
  111. --- ./allinone.c.orig 2004-09-13 04:34:23.728820112 +0200
  112. +++ ./allinone.c 2004-09-13 04:37:51.664209128 +0200
  113. @@ -77,9 +77,7 @@
  114. #endif
  115. -static void disp ( const char *s ) __attribute__ (( regparm (1) ));
  116. -
  117. -static void disp ( const char *s )
  118. +static void __attribute__ (( regparm (1) )) disp ( const char *s )
  119. {
  120. static int notfirst;
  121. @@ -89,9 +87,7 @@
  122. }
  123. -static void interpret_esc ( unsigned char* src ) __attribute__ (( regparm (1) ));
  124. -
  125. -static void interpret_esc ( unsigned char* src )
  126. +static void __attribute__ (( regparm (1) )) interpret_esc ( unsigned char* src )
  127. {
  128. unsigned char *dst = src;