diff options
author | alepulver <alepulver@FreeBSD.org> | 2006-12-08 23:53:40 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2006-12-08 23:53:40 +0800 |
commit | e6321667f459435ccd00d38150882d2ef85579cf (patch) | |
tree | 2ae36caea885e4c43e202af23a07d798f12aefb3 /lang | |
parent | b0f6dae2aeb43550992c5ef5f3fdfc02189e63c0 (diff) | |
download | freebsd-ports-gnome-e6321667f459435ccd00d38150882d2ef85579cf.tar.gz freebsd-ports-gnome-e6321667f459435ccd00d38150882d2ef85579cf.tar.zst freebsd-ports-gnome-e6321667f459435ccd00d38150882d2ef85579cf.zip |
- Fix building the fastcgi module.
- Import patch from clisp project [1].
- Add patch for missing strndup() function in FreeBSD [2].
PR: ports/106464
Submitted by: Hyo.geol [2]
Obtained from: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1595306&group_id=1355 [1]
Diffstat (limited to 'lang')
-rw-r--r-- | lang/clisp/files/patch-modules__fastcgi__fastcgi.lisp | 12 | ||||
-rw-r--r-- | lang/clisp/files/patch-modules__fastcgi__fastcgi_wrappers.c | 40 |
2 files changed, 52 insertions, 0 deletions
diff --git a/lang/clisp/files/patch-modules__fastcgi__fastcgi.lisp b/lang/clisp/files/patch-modules__fastcgi__fastcgi.lisp new file mode 100644 index 000000000000..86eb80c84002 --- /dev/null +++ b/lang/clisp/files/patch-modules__fastcgi__fastcgi.lisp @@ -0,0 +1,12 @@ +--- ./modules/fastcgi/fastcgi.lisp.orig Fri Dec 8 08:42:55 2006 ++++ ./modules/fastcgi/fastcgi.lisp Fri Dec 8 08:45:45 2006 +@@ -146,7 +146,8 @@ + + + ; -------------- "C" functions +-;(c-lines "#include \"fastcgi.h\"~%"); completely wrapped ++(eval-when (compile) ++ (setq ffi:*output-c-functions* t)) + + ; Our wrappers + (def-call-out fcgi_getenv (:arguments (var c-string)) (:return-type c-string)) diff --git a/lang/clisp/files/patch-modules__fastcgi__fastcgi_wrappers.c b/lang/clisp/files/patch-modules__fastcgi__fastcgi_wrappers.c new file mode 100644 index 000000000000..f2b01d03f4fa --- /dev/null +++ b/lang/clisp/files/patch-modules__fastcgi__fastcgi_wrappers.c @@ -0,0 +1,40 @@ +--- ./modules/fastcgi/fastcgi_wrappers.c.orig Fri Dec 8 09:28:45 2006 ++++ ./modules/fastcgi/fastcgi_wrappers.c Fri Dec 8 09:35:23 2006 +@@ -41,6 +41,25 @@ + /* Crank this up as needed */ + #define TEMPBUFSIZE 65536 + ++#ifdef __FreeBSD__ ++char* t_strndup(const char* string, size_t n) ++{ ++ char* copy_string = 0; ++ ++ if(0 == string || 0 == n) ++ return 0; ++ ++ copy_string = (char*) malloc(n + 1); ++ if(0 == copy_string) ++ return 0; ++ ++ memcpy(copy_string, string, n); ++ *(copy_string + n) = '\0'; ++ ++ return copy_string; ++} ++#endif ++ + /* Local functions */ + static char * read_stdio(FILE *); + static int write_stdio(FILE *, char *, int); +@@ -91,7 +110,11 @@ + result[i+1] = NULL; + } + else { ++#ifdef __FreeBSD__ ++ result[i] = t_strndup(*envp, equ - *envp); ++#else + result[i] = strndup(*envp, equ - *envp); ++#endif + result[i+1] = strdup(equ + 1); + } + } |