Summary(pl.UTF-8): Kompilator C Bruce'a
Name: bcc
Version: 0.16.17
-Release: 4
+Release: 5
License: GPL
Group: Development/Languages
#Source0Download: http://www.cix.co.uk/~mayday/
# Source0-md5: e7bbfdbe61c2fb964994a087e29b0087
Patch0: Dev86src-noroot.patch
Patch1: Dev86src-opt.patch
+Patch2: dev86-0.16.17-fortify.patch
+Patch3: dev86-pic.patch
+Patch4: dev86-0.16.17-make382.patch
URL: http://homepage.ntlworld.com/robert.debath/
Requires: bin86
ExclusiveArch: %{ix86}
%setup -q -n dev86-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p0
+%patch4 -p0
mv -f bootblocks/README README.bootblocks
mv -f copt/README README.copt
%build
CC="%{__cc}" \
%{__make} -j1 all other \
- OPT="%{rpmcflags}" <<!FooBar!
+ OPT="%{rpmcppflags} %{rpmcflags}" <<!FooBar!
5
quit
!FooBar!
--- /dev/null
+--- dev86-0.16.17/bcc/bcc.c
++++ dev86-0.16.17/bcc/bcc.c
+@@ -19,6 +19,7 @@
+ #ifdef __STDC__
+ #include <stdlib.h>
+ #ifndef MSDOS
++#include <limits.h>
+ #include <unistd.h>
+ #endif
+ #else
+@@ -596,12 +597,17 @@
+ }
+ }
+
+-void
+-command_reset()
+-{
+ #ifndef MAXPATHLEN
++#ifdef PATH_MAX
++#define MAXPATHLEN PATH_MAX
++#else
+ #define MAXPATHLEN 1024
+ #endif
++#endif
++
++void
++command_reset()
++{
+ char buf[MAXPATHLEN];
+ char ** prefix;
+ char * saved_cmd;
+@@ -1308,11 +1314,7 @@
+
+ for(d=s=ptr; d && *s; s=d)
+ {
+-#ifdef MAXPATHLEN
+ char buf[MAXPATHLEN];
+-#else
+- char buf[1024];
+-#endif
+
+ free(temp);
+ d=strchr(s, ':');
--- /dev/null
+--- libc/i386sys/Makefile
++++ libc/i386sys/Makefile
+@@ -12,7 +12,7 @@
+ DOBJ=opendir.o closedir.o readdir.o
+
+ ifeq ($(LIB_CPU)-$(LIB_OS),i386-ELKS)
+-OBJ=$(LOBJ3) $(LOBJ) $(EOBJ) $(DOBJ) setjmp3.o
++OBJ=$(LOBJ) $(LOBJ) $(EOBJ) $(DOBJ) setjmp3.o
+ SYSCALLS=syscalls
+
+ CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS)
--- /dev/null
+--- elksemu/elks.c.orig 2005-11-04 01:35:37.000000000 +0100
++++ elksemu/elks.c 2005-11-04 01:45:28.000000000 +0100
+@@ -129,8 +129,17 @@
+ static inline int vm86_mine(struct vm86_struct* v86)
+ {
+ int __res;
++#ifndef __PIC__
+ __asm__ __volatile__("int $0x80\n"
+ :"=a" (__res):"a" ((int)OLD_SYS_vm86), "b" ((int)v86));
++#else
++ __asm__ __volatile__(
++ "movl %%ebx,%%ecx\n\t"
++ "movl %2,%%ebx\n\t"
++ "int $0x80\n\t"
++ "movl %%ecx,%%ebx\n\t"
++ :"=a" (__res):"a" ((int)OLD_SYS_vm86), "r" ((int)v86) : "ecx");
++#endif
+ return __res;
+ }
+ #endif