2011-11-30 10:22:57 +00:00
|
|
|
--- redhat_lsb_trigger.c.triggerfix 2008-04-16 18:50:14.000000000 +0100
|
|
|
|
+++ redhat_lsb_trigger.c 2011-09-14 11:50:42.563080000 +0100
|
|
|
|
@@ -423,10 +423,76 @@
|
2009-10-28 13:43:48 +00:00
|
|
|
#define is_ia64() 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+char *
|
|
|
|
+strtok (char *p, const char *delim)
|
|
|
|
+{
|
|
|
|
+ static char *olds;
|
|
|
|
+ const char *d;
|
|
|
|
+ char *token;
|
|
|
|
+ if (p == NULL)
|
|
|
|
+ p = olds;
|
|
|
|
+ while (*p)
|
|
|
|
+ {
|
|
|
|
+ for (d = delim; *d; d++)
|
|
|
|
+ if (*p == *d)
|
|
|
|
+ break;
|
|
|
|
+ if (!*d)
|
|
|
|
+ break;
|
|
|
|
+ p++;
|
|
|
|
+ }
|
|
|
|
+ if (!*p)
|
|
|
|
+ {
|
|
|
|
+ olds = p;
|
|
|
|
+ return NULL;
|
|
|
|
+ }
|
|
|
|
+ token = p;
|
|
|
|
+ while (*p)
|
|
|
|
+ {
|
|
|
|
+ for (d = delim; *d; d++)
|
|
|
|
+ if (*p == *d)
|
|
|
|
+ break;
|
|
|
|
+ if (*d)
|
|
|
|
+ break;
|
|
|
|
+ p++;
|
|
|
|
+ }
|
|
|
|
+ if (!*p)
|
|
|
|
+ olds = p;
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ *p = '\0';
|
|
|
|
+ olds = p + 1;
|
|
|
|
+ }
|
|
|
|
+ return token;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+size_t
|
|
|
|
+strlen (const char *s)
|
|
|
|
+{
|
|
|
|
+ const char *p;
|
|
|
|
+ for (p = s; *p; ++p);
|
|
|
|
+ return p - s;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void *
|
|
|
|
+mempcpy (void *dst, const void *src, size_t n)
|
|
|
|
+{
|
|
|
|
+ char *d = dst;
|
|
|
|
+ const char *s = src;
|
|
|
|
+ while (n--)
|
|
|
|
+ *d++ = *s++;
|
|
|
|
+ return d;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+char *
|
|
|
|
+strcpy (char *dst, const char *src)
|
|
|
|
+{
|
|
|
|
+ char *ret = dst;
|
|
|
|
+ while ((*dst++ = *src++) != '\0');
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
-/* redhat_lsb_trigger.c:428: warning: unused variable 'ret' */
|
|
|
|
-/* long ret; */
|
|
|
|
INTERNAL_SYSCALL_DECL (err);
|
|
|
|
char lsbsover[] = LSBSOVER;
|
|
|
|
char *LSBVER, *p = lsbsover;
|
2011-11-30 10:22:57 +00:00
|
|
|
@@ -450,15 +516,38 @@
|
|
|
|
int __libc_multiple_threads __attribute__((nocommon));
|
|
|
|
int __libc_enable_asynccancel (void) { return 0; }
|
|
|
|
void __libc_disable_asynccancel (int x) { }
|
|
|
|
+#ifndef __arm__
|
|
|
|
void __libc_csu_init (void) { }
|
|
|
|
void __libc_csu_fini (void) { }
|
|
|
|
+#endif
|
2009-10-28 13:43:48 +00:00
|
|
|
pid_t __fork (void) { return -1; }
|
|
|
|
char thr_buf[65536];
|
|
|
|
|
2011-11-30 10:22:57 +00:00
|
|
|
-#ifndef __powerpc__
|
2009-10-28 13:43:48 +00:00
|
|
|
+void
|
|
|
|
+__attribute__ ((noreturn))
|
|
|
|
+__stack_chk_fail (void)
|
|
|
|
+{
|
|
|
|
+ INTERNAL_SYSCALL_DECL (err);
|
|
|
|
+ while (1)
|
|
|
|
+ INTERNAL_SYSCALL (exit, err, 1, 1);
|
|
|
|
+}
|
|
|
|
+
|
2011-11-30 10:22:57 +00:00
|
|
|
+#if defined __powerpc__
|
|
|
|
+
|
|
|
|
+struct startup_info
|
|
|
|
+{
|
|
|
|
+ void *sda_base;
|
|
|
|
+ int (*main) (int, char **, char **, void *);
|
|
|
|
+ int (*init) (int, char **, char **, void *);
|
|
|
|
+ void (*fini) (void);
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+int __libc_start_main (int argc, char **argv, char **ev,
|
|
|
|
+ void *auxvec, void (*rtld_fini) (void),
|
|
|
|
+ struct startup_info *stinfo,
|
|
|
|
+ char **stack_on_entry)
|
|
|
|
+#elif defined __arm__
|
2009-10-28 13:43:48 +00:00
|
|
|
|
|
|
|
-/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
|
|
|
|
- * * (.opd+0x10): multiple definition of `__libc_start_main' */
|
2011-11-30 10:22:57 +00:00
|
|
|
int ___libc_start_main (int (*main) (int argc, char **argv),
|
2009-10-28 13:43:48 +00:00
|
|
|
int argc, char **argv,
|
|
|
|
void (*init) (void), void (*fini) (void),
|
2011-11-30 10:22:57 +00:00
|
|
|
@@ -472,9 +561,7 @@
|
2009-10-28 13:43:48 +00:00
|
|
|
void (*fini) (void);
|
|
|
|
};
|
|
|
|
|
|
|
|
-/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
|
|
|
|
- * (.opd+0x10): multiple definition of `__libc_start_main' */
|
|
|
|
-int ___libc_start_main (int argc, char **argv, char **ev,
|
|
|
|
+int __libc_start_main (int argc, char **argv, char **ev,
|
|
|
|
void *auxvec, void (*rtld_fini) (void),
|
|
|
|
struct startup_info *stinfo,
|
|
|
|
char **stack_on_entry)
|