diff options
author | mezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-04-23 00:21:02 +0800 |
---|---|---|
committer | mezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-04-23 00:21:02 +0800 |
commit | bed81a6f253e33e51a0ae9796f5b9977425e8361 (patch) | |
tree | 76d5406a2e7bce78662c1ea15235d1fecf93b4d1 /math/gcalctool/files/patch-src_gcalccmd.c | |
parent | 1636ef8c5f43391b2a7a0ab36b14035d6abe2ba9 (diff) | |
download | marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.tar marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.tar.gz marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.tar.bz2 marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.tar.lz marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.tar.xz marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.tar.zst marcuscom-ports-bed81a6f253e33e51a0ae9796f5b9977425e8361.zip |
Add CONFLICTS with the each others.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@15853 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'math/gcalctool/files/patch-src_gcalccmd.c')
-rw-r--r-- | math/gcalctool/files/patch-src_gcalccmd.c | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/math/gcalctool/files/patch-src_gcalccmd.c b/math/gcalctool/files/patch-src_gcalccmd.c new file mode 100644 index 000000000..8766e797d --- /dev/null +++ b/math/gcalctool/files/patch-src_gcalccmd.c @@ -0,0 +1,92 @@ +--- src/gcalccmd.c.orig 2009-12-08 21:27:37.000000000 -0500 ++++ src/gcalccmd.c 2010-01-24 13:38:19.000000000 -0500 +@@ -18,16 +18,89 @@ + * 02111-1307, USA. + */ + ++#include <errno.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <sys/types.h> ++#include <sys/param.h> + #include <time.h> + + #include "mp-equation.h" + + #define MAXLINE 1024 + ++#if __FreeBSD_version < 800067 ++static ssize_t ++getline (char **lineptr, size_t *n, FILE *stream) ++{ ++ char *line, *p; ++ long size, copy; ++ ++ if (lineptr == NULL || n == NULL) { ++ errno = EINVAL; ++ return (ssize_t) -1; ++ } ++ ++ if (ferror (stream)) ++ return (ssize_t) -1; ++ ++ /* Make sure we have a line buffer to start with. */ ++ if (*lineptr == NULL || *n < 2) /* !seen and no buf yet need 2 chars. */ { ++#ifndef MAX_CANON ++#define MAX_CANON 256 ++#endif ++ if (!*lineptr) ++ line = (char *) malloc (MAX_CANON); ++ else ++ line = (char *) realloc (*lineptr, MAX_CANON); ++ if (line == NULL) ++ return (ssize_t) -1; ++ *lineptr = line; ++ *n = MAX_CANON; ++ } ++ ++ line = *lineptr; ++ size = *n; ++ ++ copy = size; ++ p = line; ++ ++ while (1) { ++ long len; ++ ++ while (--copy > 0) { ++ int c = getc (stream); ++ ++ if (c == EOF) ++ goto lose; ++ else if ((*p++ = c) == '\n') ++ goto win; ++ } ++ ++ /* Need to enlarge the line buffer. */ ++ len = p - line; ++ size *= 2; ++ line = (char *) realloc (line, size); ++ if (line == NULL) ++ goto lose; ++ *lineptr = line; ++ *n = size; ++ p = line + len; ++ copy = size - len; ++ } ++ ++lose: ++ if (p == *lineptr) ++ return (ssize_t) -1; ++ ++ /* Return a partial line since we got an error in the middle. */ ++win: ++ *p = '\0'; ++ return p - *lineptr; ++} ++#endif ++ + static void + solve(const char *equation) + { |