public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-misc/sl/files: Makefile.patch fix_compilation.patch
@ 2010-08-09 20:34 Christian Ruppert (idl0r)
  0 siblings, 0 replies; only message in thread
From: Christian Ruppert (idl0r) @ 2010-08-09 20:34 UTC (permalink / raw
  To: gentoo-commits

idl0r       10/08/09 20:34:22

  Added:                Makefile.patch fix_compilation.patch
  Log:
  Revision bump. Add Makefile patch to allow the use of the Makefile. Add patch to fix compiler warnings. Fix HOMEPAGE. Use EAPI 3, some QA fixes and clean up. Thanks to Diego E. 'Flameeyes' Pettenò <flameeyes@gentoo.org> for the calloc hint.
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  app-misc/sl/files/Makefile.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/sl/files/Makefile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/sl/files/Makefile.patch?rev=1.1&content-type=text/plain

Index: Makefile.patch
===================================================================
--- sl.orig/Makefile	2010-08-09 21:36:45.483225339 +0200
+++ sl/Makefile	2010-08-09 21:58:23.915058929 +0200
@@ -5,13 +5,13 @@
 #	Last Modified: 1998/ 7/22
 #==========================================
 
-CC = gcc
+CC ?= gcc
 
 #DEBUGOPTS = -DDEBUG -g
 
 # For Linux 2.0.x
-LDFLAGS = -lncurses -ltermcap
-CFLAGS = -Wall -O2 -DLINUX20 $(DEBUGOPTS)
+LDLIBS = -lncurses
+CFLAGS ?= -Wall -O2 $(DEBUGOPTS)
 
 # For Solaris
 #LDFLAGS = -lcurses -ltermcap
@@ -19,8 +19,7 @@ CFLAGS = -Wall -O2 -DLINUX20 $(DEBUGOPTS
 
 all: sl
 
-sl: sl.c sl.h header.h Makefile
-	$(CC) $(CFLAGS) -o sl sl.c $(LDFLAGS)
+sl: sl.o
 
 clean:
 	-rm -f sl sl.o core



1.1                  app-misc/sl/files/fix_compilation.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/sl/files/fix_compilation.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/sl/files/fix_compilation.patch?rev=1.1&content-type=text/plain

Index: fix_compilation.patch
===================================================================
--- sl.orig/sl.c	2010-08-09 21:36:45.483225339 +0200
+++ sl/sl.c	2010-08-09 22:01:12.462051982 +0200
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <strings.h>
+#include <string.h>
 #include <time.h>
 #ifdef LINUX20
   #include <ncurses/curses.h>
@@ -186,10 +187,7 @@ int main(int argc, char *argv[])
     scrollok(stdscr, FALSE);
     DIREC = RTOL;
     p = 3 * COLS / 10;
-    pp = (char*)malloc((size_t)(COLS + ALL_LENGTH + 10) * (D51HIGHT + 1) * (D51PATTERNS + 1));
-    for (i = 0; i <= (COLS + ALL_LENGTH + 1) * (D51HIGHT + 1) * D51PATTERNS; ++i) {
-      pp[i] = (char)NULL;
-    }
+    pp = (char *)calloc(1, (size_t)(COLS + ALL_LENGTH + 10) * (D51HIGHT + 1) * (D51PATTERNS + 1));
 
     for (j = 0; j < D51PATTERNS; ++j) {
       for (i = 0; i <= D51HIGHT; ++i) {






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-09 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 20:34 [gentoo-commits] gentoo-x86 commit in app-misc/sl/files: Makefile.patch fix_compilation.patch Christian Ruppert (idl0r)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox