aboutsummaryrefslogtreecommitdiffstats
path: root/main/mg/musl-fixes.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-22 09:34:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-22 09:34:45 +0000
commitfb83935ac17864c3e9e7b34c81d203385de3f81a (patch)
tree2d39395c9d9204b4384d761a8f3d3ed699a201f9 /main/mg/musl-fixes.patch
parent274baa32b4cbba83f3d9bb8b812839b7da51e312 (diff)
downloadaports-fb83935ac17864c3e9e7b34c81d203385de3f81a.tar.bz2
aports-fb83935ac17864c3e9e7b34c81d203385de3f81a.tar.xz
main/mg: upgrade to 20140414
Diffstat (limited to 'main/mg/musl-fixes.patch')
-rw-r--r--main/mg/musl-fixes.patch106
1 files changed, 65 insertions, 41 deletions
diff --git a/main/mg/musl-fixes.patch b/main/mg/musl-fixes.patch
index b098d53526..31f3fbcc6b 100644
--- a/main/mg/musl-fixes.patch
+++ b/main/mg/musl-fixes.patch
@@ -1,51 +1,75 @@
---- mg-20110905.orig/fileio.c
-+++ mg-20110905/fileio.c
-@@ -570,7 +570,7 @@
- #if defined (__CYGWIN__) /* Cygwin lacks reclen/namlen. */
- if (strlen(dent->d_name) < len
- || memcmp(cp, dent->d_name, len) != 0)
--#elif defined (__GLIBC__) /* Linux uses reclen instead. */
-+#elif defined (__linux__) /* Linux uses reclen instead. */
- if (dent->d_reclen < len || memcmp(cp, dent->d_name, len) != 0)
- #else
- if (dent->d_namlen < len || memcmp(cp, dent->d_name, len) != 0)
---- mg-20110905.orig/sysdef.h
-+++ mg-20110905/sysdef.h
-@@ -20,15 +20,13 @@
-
- /* necesarry to get asprintf & friends with glibc XXX doesn't work for some
- * mysterious reason! */
+diff --git a/GNUmakefile b/GNUmakefile
+index a89c697..ece5944 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -31,7 +31,7 @@ CURSES_LIBS= -lcurses
+ CC= gcc
+ CFLAGS?= -O2 -pipe
+ CFLAGS+= -g -Wall
+-CPPFLAGS= -DFKEYS -DREGEX -DXKEYS
++CPPFLAGS= -DFKEYS -DXKEYS
+ CPPFLAGS+= $(BSD_CPPFLAGS) -D__dead=__dead2
+ LIBS= $(CURSES_LIBS) $(BSD_LIBS)
+
+diff --git a/Makefile b/Makefile
+index 023ed17..0c92790 100644
+--- a/Makefile
++++ b/Makefile
+@@ -13,7 +13,7 @@ DPADD+= ${LIBCURSES} ${LIBUTIL}
+ # XKEYS -- use termcap function key definitions.
+ # note: XKEYS and bsmap mode do _not_ get along.
+ #
+-CFLAGS+=-Wall -DFKEYS -DREGEX -DXKEYS
++CFLAGS+=-Wall -DFKEYS -DXKEYS
+
+ SRCS= autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \
+ echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
+diff --git a/main.c b/main.c
+index 9204d63..dfd4a6a 100644
+--- a/main.c
++++ b/main.c
+@@ -14,6 +14,10 @@
+ #include <err.h>
+ #include <locale.h>
+
++#ifndef __dead2
++#define __dead2
++#endif
++
+ int thisflag; /* flags, this command */
+ int lastflag; /* flags, last command */
+ int curgoal; /* goal column */
+diff --git a/sysdef.h b/sysdef.h
+index 8d3d3a2..ea82d73 100644
+--- a/sysdef.h
++++ b/sysdef.h
+@@ -8,12 +8,7 @@
+ #include <sys/param.h>
+ #include <sys/queue.h>
+
+-/* necesarry to get asprintf & friends with glibc XXX doesn't work for some
+- * mysterious reason! */
-#ifdef __GLIBC__
-# define _GNU_SOURCE
-# define __USE_GNU
-#endif
+#define _GNU_SOURCE
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
+ #if defined(__APPLE__) || defined(__FreeBSD__)
+ # define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
+@@ -25,10 +20,15 @@
#include <string.h>
-+#include <fcntl.h>
#include <errno.h>
#include <signal.h>
++#include <fcntl.h>
+
+ #define KBLOCK 8192 /* Kill grow. */
+ #define GOOD 0 /* Good exit status. */
+
++#ifndef DEFFILEMODE /* 4.4BSD extension. */
++#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
++#endif
++
+ typedef int RSIZE; /* Type for file/region sizes */
+ typedef short KCHAR; /* Type for internal keystrokes */
---- mg-20110905.orig/theo.c
-+++ mg-20110905/theo.c
-@@ -218,14 +218,14 @@
- {
- const char *str;
- int len;
-- uint random;
-+ unsigned int random;
- #ifndef HAVE_ARC4RANDOM
- struct timeval tv[2];
-
- gettimeofday(&tv[0], NULL);
-- random = (uint)tv[0].tv_usec;
-+ random = (unsigned int)tv[0].tv_usec;
- #else
-- random = (uint)arc4random();
-+ random = (unsigned int)arc4random();
- #endif
-
- str = talk[random % ntalk];