From bd5061aa67778c1e389f10a17b105da2c0298330 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 25 Mar 2003 01:47:07 +0000 Subject: [PATCH] - new; memset patch is needed when memset() is inline macro Changed files: TurboC-memset.patch -> 1.1 TurboC.spec -> 1.1 --- TurboC-memset.patch | 19 +++++++++++++++ TurboC.spec | 57 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 TurboC-memset.patch create mode 100644 TurboC.spec diff --git a/TurboC-memset.patch b/TurboC-memset.patch new file mode 100644 index 0000000..5ed1b15 --- /dev/null +++ b/TurboC-memset.patch @@ -0,0 +1,19 @@ +--- TurboC-source/TurboC.h.orig Tue Dec 17 02:51:22 2002 ++++ TurboC-source/TurboC.h Tue Mar 25 00:26:41 2003 +@@ -219,6 +219,16 @@ + #define strncmp strncmpTurbo + #endif // strcmp + ++#ifdef memset ++static inline void* ++memsetTurbo (void *s, int16_t c, int16_t n) ++{ ++ return (memset (s, c, n)); ++} ++#undef memset ++#define memset memsetTurbo ++#endif ++ + #ifdef strncasecmp + static inline int16_t + strncmpi (const char *s1, const char *s2, int16_t n) diff --git a/TurboC.spec b/TurboC.spec new file mode 100644 index 0000000..b10defc --- /dev/null +++ b/TurboC.spec @@ -0,0 +1,57 @@ +Summary: TurboC - a library for porting Borland Turbo C to GNU gcc +Summary(pl): TurboC - biblioteka do portowania Turbo C Borlanda do GNU gcc +Name: TurboC +Version: 20021216 +Release: 1 +License: LGPL +Group: Development/Libraries +Source0: http://www.sandroid.org/TurboC/%{name}-dev.tar.gz +Patch0: %{name}-memset.patch +URL: http://www.sandroid.org/TurboC/ +BuildRequires: XFree86-devel +BuildRequires: ncurses-devel +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define _includedir %{_prefix}/include/TurboC + +%description +TurboC is a useful little kit of stuff that can be used for converting +a Borland Turbo C application to a GNU gcc program. It doesn't do the +whole job, but it does provide various library functions present in +Turbo C but not in gcc libraries. + +It contains replacements for the following headers: alloc.h bios.h +dir.h dos.h fnkeys.h graphics.h io.h. + +%description -l pl +TurboC to zestaw przydatny do konwersji programów z Turbo C Borlanda +do GNU gcc. Nie wykonuje ca³ej pracy, ale dostarcza ró¿nych funkcji +obecnych w Turbo C, których nie ma w gcc. + +Zawiera zamienniki nastêpuj±cych plików nag³ówkowych: alloc.h bios.h +dir.h dos.h fnkeys.h graphics.h io.h. + +%prep +%setup -q -n %{name}-source +%patch -p1 + +%build +%{__make} \ + CC="%{__cc}" \ + COPTIONS="%{rpmcflags} -DWITH_X -I/usr/X11R6/include -I/usr/include/ncurses" + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}} + +install *.a $RPM_BUILD_ROOT%{_libdir} +install TurboC.h alloc.h bios.h dir.h dos.h fnkeys.h graphics.h io.h \ + $RPM_BUILD_ROOT%{_includedir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%{_libdir}/*.a +%{_includedir} -- 2.43.0