OpenSDE Packages Database (without history before r20070)
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.

105 lines
2.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../fgetty/x-de-diet-fication.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Fixed fgetty to build witout dietlibc.
  17. - Rene Rebe <rene@exactcode.de>
  18. --- ./fgetty.c.vanilla 2005-02-27 11:30:39.580133784 +0100
  19. +++ ./fgetty.c 2005-02-27 11:31:37.798283280 +0100
  20. @@ -10,6 +10,7 @@
  21. #include <sys/ioctl.h>
  22. #include <errno.h>
  23. #include <termios.h>
  24. +#include <time.h>
  25. #include "fmt.h"
  26. --- ./login.c.vanilla 2005-02-27 11:33:30.557141328 +0100
  27. +++ ./login.c 2005-02-27 11:33:41.628458232 +0100
  28. @@ -36,6 +36,8 @@
  29. #include <fcntl.h>
  30. #include <signal.h>
  31. +extern char **environ;
  32. +
  33. void die(const char *message) {
  34. write(2,message,strlen(message));
  35. write(2,"\n",1);
  36. --- ./ltostr.c.vanilla 2005-02-27 11:37:07.164212048 +0100
  37. +++ ./ltostr.c 2005-02-27 11:37:38.768407480 +0100
  38. @@ -0,0 +1,36 @@
  39. +#include <string.h>
  40. +#include <stdlib.h>
  41. +
  42. +#ifndef __dietlibc__
  43. +
  44. +int __ltostr(char *s, unsigned int size, unsigned long i, unsigned int base, int UpCase)
  45. +{
  46. + char *tmp;
  47. + unsigned int j=0;
  48. +
  49. + s[--size]=0;
  50. +
  51. + tmp=s+size;
  52. +
  53. + if ((base==0)||(base>36)) base=10;
  54. +
  55. + j=0;
  56. + if (!i)
  57. + {
  58. + *(--tmp)='0';
  59. + j=1;
  60. + }
  61. +
  62. + while((tmp>s)&&(i))
  63. + {
  64. + tmp--;
  65. + if ((*tmp=i%base+'0')>'9') *tmp+=(UpCase?'A':'a')-'9'-1;
  66. + i=i/base;
  67. + j++;
  68. + }
  69. + memmove(s,tmp,j+1);
  70. +
  71. + return j;
  72. +}
  73. +
  74. +#endif
  75. --- ./Makefile.vanilla 2005-02-27 11:32:44.925078456 +0100
  76. +++ ./Makefile 2005-02-27 11:42:09.696220192 +0100
  77. @@ -9,7 +9,7 @@
  78. STRIP=strip
  79. #CROSS=arm-linux-
  80. CROSS=
  81. -LDFLAGS=-s
  82. +LDFLAGS=-s -lcrypt
  83. %.o: %.c
  84. # gcc -march=i386 -mcpu=i386 -pipe -Os -fomit-frame-pointer -I../dietlibc/include -c $^ -DTEST
  85. @@ -18,11 +18,11 @@
  86. $(CROSS)$(STRIP) -x -R .comment -R .note $@
  87. %: %.o
  88. - $(DIET) $(CROSS)$(CC) -nostdlib -o $@ $^ $(LDFLAGS)
  89. + $(DIET) $(CROSS)$(CC) -o $@ $^ $(LDFLAGS)
  90. fgetty: fgetty.o fmt_ulong.o
  91. -login: login.o
  92. +login: login.o ltostr.o
  93. login2: login2.o
  94. checkpassword: checkpassword.o