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.

119 lines
4.3 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../dietlibc/posixfy_utime_execl_execle.patch
  5. # Copyright (C) 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. # --- T2-COPYRIGHT-NOTE-END ---
  16. diff -Nudr dietlibc-0.28.orig/include/unistd.h dietlibc-0.28/include/unistd.h
  17. --- dietlibc-0.28.orig/include/unistd.h 2004-07-02 10:47:06.000000000 -0400
  18. +++ dietlibc-0.28/include/unistd.h 2006-01-03 18:38:17.000000000 -0300
  19. @@ -65,8 +65,8 @@
  20. int execlp(const char *file, const char *arg, ...) __THROW;
  21. int execv(const char *path, char *const argv[]) __THROW;
  22. int execvp(const char *file, char *const argv[]) __THROW;
  23. -int execl(const char *path, ...) __THROW;
  24. -int execle(const char *path, ...) __THROW;
  25. +int execl(const char *path, const char *arg, ...) __THROW;
  26. +int execle(const char *path, const char *arg, ...) __THROW;
  27. pid_t getpid(void) __THROW;
  28. pid_t getppid(void) __THROW;
  29. diff -Nudr dietlibc-0.28.orig/include/utime.h dietlibc-0.28/include/utime.h
  30. --- dietlibc-0.28.orig/include/utime.h 2003-08-19 12:58:17.000000000 -0400
  31. +++ dietlibc-0.28/include/utime.h 2006-01-03 18:32:18.000000000 -0300
  32. @@ -12,7 +12,7 @@
  33. time_t modtime; /* modification time */
  34. };
  35. -int utime(const char* filename, struct utimbuf* buf) __THROW;
  36. +int utime(const char* filename, const struct utimbuf* buf) __THROW;
  37. __END_DECLS
  38. diff -Nudr dietlibc-0.28.orig/lib/execl.c dietlibc-0.28/lib/execl.c
  39. --- dietlibc-0.28.orig/lib/execl.c 2003-10-29 13:49:57.000000000 -0300
  40. +++ dietlibc-0.28/lib/execl.c 2006-01-03 19:12:00.000000000 -0300
  41. @@ -4,18 +4,19 @@
  42. #include <stdlib.h>
  43. #include "dietfeatures.h"
  44. -int execl( const char *path,...) {
  45. +int execl( const char *path, const char *arg0, ...) {
  46. va_list ap,bak;
  47. int n,i;
  48. char **argv,*tmp;
  49. - va_start(ap, path);
  50. + va_start(ap, arg0);
  51. va_copy(bak,ap);
  52. - n=1;
  53. + n=2;
  54. while ((tmp=va_arg(ap,char *)))
  55. ++n;
  56. va_end (ap);
  57. if ((argv=(char **)alloca(n*sizeof(char*)))) {
  58. - for (i=0; i<n; ++i)
  59. + argv[0]=(char *)arg0;
  60. + for (i=1; i<n; ++i)
  61. argv[i]=va_arg(bak,char *);
  62. va_end (bak);
  63. return execve(path,argv,environ);
  64. diff -Nudr dietlibc-0.28.orig/lib/execle.c dietlibc-0.28/lib/execle.c
  65. --- dietlibc-0.28.orig/lib/execle.c 2001-10-04 10:50:49.000000000 -0400
  66. +++ dietlibc-0.28/lib/execle.c 2006-01-03 19:14:14.000000000 -0300
  67. @@ -4,18 +4,19 @@
  68. #include <stdlib.h>
  69. #include "dietfeatures.h"
  70. -int execle( const char *path,...) {
  71. +int execle( const char *path, const char *arg0, ...) {
  72. va_list ap;
  73. int n,i;
  74. char **argv,*tmp, **env;
  75. - va_start(ap, path);
  76. - n=1;
  77. + va_start(ap, arg0);
  78. + n=2;
  79. while ((tmp=va_arg(ap,char *)))
  80. ++n;
  81. va_end (ap);
  82. if ((argv=(char **)alloca(n*sizeof(char*)))) {
  83. - va_start(ap, path);
  84. - for (i=0; i<n; ++i)
  85. + va_start(ap, arg0);
  86. + argv[0]=(char *)arg0;
  87. + for (i=1; i<n; ++i)
  88. argv[i]=va_arg(ap,char *);
  89. env=va_arg(ap, char **);
  90. va_end (ap);
  91. --- dietlibc-0.30/libcompat/utimes.c.orig 2005-09-21 09:33:08.000000000 +0200
  92. +++ dietlibc-0.30/libcompat/utimes.c 2006-06-22 13:59:51.000000000 +0200
  93. @@ -7,7 +7,7 @@
  94. #include <utime.h>
  95. #include <sys/types.h>
  96. -int utimes(const char *filename, struct timeval *tvp) {
  97. +int utimes(const char *filename, const struct timeval *tvp) {
  98. struct utimbuf b;
  99. if (!tvp) {
  100. return utime(filename,NULL);
  101. --- dietlibc-0.30/include/sys/time.h.orig 2006-06-22 14:01:38.000000000 +0200
  102. +++ dietlibc-0.30/include/sys/time.h 2006-06-22 13:53:18.000000000 +0200
  103. @@ -75,7 +75,7 @@
  104. #define timersub(a,b,x) do { (x)->tv_sec=(a)->tv_sec-(b)->tv_sec; if (((x)->tv_usec=(a)->tv_usec-(b)->tv_usec)<0) { --(x)->tv_sec; (x)->tv_usec+=1000000; } } while (0)
  105. #define timerisset(x) ((x)->tv_sec || (x)->tv_usec)
  106. -int utimes(const char * filename, struct timeval * tvp);
  107. +int utimes(const char * filename, const struct timeval * tvp);
  108. #endif
  109. __END_DECLS