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.
120 lines
4.3 KiB
120 lines
4.3 KiB
18 years ago
|
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
|
#
|
||
|
# T2 SDE: package/.../dietlibc/posixfy_utime_execl_execle.patch
|
||
|
# Copyright (C) 2006 The T2 SDE Project
|
||
|
#
|
||
|
# More information can be found in the files COPYING and README.
|
||
|
#
|
||
|
# This patch file is dual-licensed. It is available under the license the
|
||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||
|
# of the GNU General Public License as published by the Free Software
|
||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||
|
# version.
|
||
|
# --- T2-COPYRIGHT-NOTE-END ---
|
||
|
|
||
|
diff -Nudr dietlibc-0.28.orig/include/unistd.h dietlibc-0.28/include/unistd.h
|
||
|
--- dietlibc-0.28.orig/include/unistd.h 2004-07-02 10:47:06.000000000 -0400
|
||
|
+++ dietlibc-0.28/include/unistd.h 2006-01-03 18:38:17.000000000 -0300
|
||
|
@@ -65,8 +65,8 @@
|
||
|
int execlp(const char *file, const char *arg, ...) __THROW;
|
||
|
int execv(const char *path, char *const argv[]) __THROW;
|
||
|
int execvp(const char *file, char *const argv[]) __THROW;
|
||
|
-int execl(const char *path, ...) __THROW;
|
||
|
-int execle(const char *path, ...) __THROW;
|
||
|
+int execl(const char *path, const char *arg, ...) __THROW;
|
||
|
+int execle(const char *path, const char *arg, ...) __THROW;
|
||
|
|
||
|
pid_t getpid(void) __THROW;
|
||
|
pid_t getppid(void) __THROW;
|
||
|
diff -Nudr dietlibc-0.28.orig/include/utime.h dietlibc-0.28/include/utime.h
|
||
|
--- dietlibc-0.28.orig/include/utime.h 2003-08-19 12:58:17.000000000 -0400
|
||
|
+++ dietlibc-0.28/include/utime.h 2006-01-03 18:32:18.000000000 -0300
|
||
|
@@ -12,7 +12,7 @@
|
||
|
time_t modtime; /* modification time */
|
||
|
};
|
||
|
|
||
|
-int utime(const char* filename, struct utimbuf* buf) __THROW;
|
||
|
+int utime(const char* filename, const struct utimbuf* buf) __THROW;
|
||
|
|
||
|
__END_DECLS
|
||
|
|
||
|
diff -Nudr dietlibc-0.28.orig/lib/execl.c dietlibc-0.28/lib/execl.c
|
||
|
--- dietlibc-0.28.orig/lib/execl.c 2003-10-29 13:49:57.000000000 -0300
|
||
|
+++ dietlibc-0.28/lib/execl.c 2006-01-03 19:12:00.000000000 -0300
|
||
|
@@ -4,18 +4,19 @@
|
||
|
#include <stdlib.h>
|
||
|
#include "dietfeatures.h"
|
||
|
|
||
|
-int execl( const char *path,...) {
|
||
|
+int execl( const char *path, const char *arg0, ...) {
|
||
|
va_list ap,bak;
|
||
|
int n,i;
|
||
|
char **argv,*tmp;
|
||
|
- va_start(ap, path);
|
||
|
+ va_start(ap, arg0);
|
||
|
va_copy(bak,ap);
|
||
|
- n=1;
|
||
|
+ n=2;
|
||
|
while ((tmp=va_arg(ap,char *)))
|
||
|
++n;
|
||
|
va_end (ap);
|
||
|
if ((argv=(char **)alloca(n*sizeof(char*)))) {
|
||
|
- for (i=0; i<n; ++i)
|
||
|
+ argv[0]=(char *)arg0;
|
||
|
+ for (i=1; i<n; ++i)
|
||
|
argv[i]=va_arg(bak,char *);
|
||
|
va_end (bak);
|
||
|
return execve(path,argv,environ);
|
||
|
diff -Nudr dietlibc-0.28.orig/lib/execle.c dietlibc-0.28/lib/execle.c
|
||
|
--- dietlibc-0.28.orig/lib/execle.c 2001-10-04 10:50:49.000000000 -0400
|
||
|
+++ dietlibc-0.28/lib/execle.c 2006-01-03 19:14:14.000000000 -0300
|
||
|
@@ -4,18 +4,19 @@
|
||
|
#include <stdlib.h>
|
||
|
#include "dietfeatures.h"
|
||
|
|
||
|
-int execle( const char *path,...) {
|
||
|
+int execle( const char *path, const char *arg0, ...) {
|
||
|
va_list ap;
|
||
|
int n,i;
|
||
|
char **argv,*tmp, **env;
|
||
|
- va_start(ap, path);
|
||
|
- n=1;
|
||
|
+ va_start(ap, arg0);
|
||
|
+ n=2;
|
||
|
while ((tmp=va_arg(ap,char *)))
|
||
|
++n;
|
||
|
va_end (ap);
|
||
|
if ((argv=(char **)alloca(n*sizeof(char*)))) {
|
||
|
- va_start(ap, path);
|
||
|
- for (i=0; i<n; ++i)
|
||
|
+ va_start(ap, arg0);
|
||
|
+ argv[0]=(char *)arg0;
|
||
|
+ for (i=1; i<n; ++i)
|
||
|
argv[i]=va_arg(ap,char *);
|
||
|
env=va_arg(ap, char **);
|
||
|
va_end (ap);
|
||
|
--- dietlibc-0.30/libcompat/utimes.c.orig 2005-09-21 09:33:08.000000000 +0200
|
||
|
+++ dietlibc-0.30/libcompat/utimes.c 2006-06-22 13:59:51.000000000 +0200
|
||
|
@@ -7,7 +7,7 @@
|
||
|
#include <utime.h>
|
||
|
#include <sys/types.h>
|
||
|
|
||
|
-int utimes(const char *filename, struct timeval *tvp) {
|
||
|
+int utimes(const char *filename, const struct timeval *tvp) {
|
||
|
struct utimbuf b;
|
||
|
if (!tvp) {
|
||
|
return utime(filename,NULL);
|
||
|
--- dietlibc-0.30/include/sys/time.h.orig 2006-06-22 14:01:38.000000000 +0200
|
||
|
+++ dietlibc-0.30/include/sys/time.h 2006-06-22 13:53:18.000000000 +0200
|
||
|
@@ -75,7 +75,7 @@
|
||
|
#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)
|
||
|
#define timerisset(x) ((x)->tv_sec || (x)->tv_usec)
|
||
|
|
||
|
-int utimes(const char * filename, struct timeval * tvp);
|
||
|
+int utimes(const char * filename, const struct timeval * tvp);
|
||
|
#endif
|
||
|
|
||
|
__END_DECLS
|