bb8d058377
ANSI Common Lisp is a high-level, general-purpose programming language. GNU CLISP is a Common Lisp implementation by Bruno Haible of Karlsruhe University and Michael Stoll of Munich University, both in Germany. It mostly supports the Lisp described in the ANSI Common Lisp standard. It runs on most Unix workstations (GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, Tru64, HP-UX, BeOS, NeXTstep, IRIX, AIX and others) and on other systems (Windows NT/2000/XP, Windows 95/98/ME) and needs only 4 MB of RAM. It is Free Software and may be distributed under the terms of GNU GPL, while it is possible to distribute commercial proprietary applications compiled with GNU CLISP. The user interface comes in English, German, French, Spanish, Dutch, Russian and Danish, and can be changed at run time. GNU CLISP includes an interpreter, a compiler, a debugger, CLOS, MOP, a foreign language interface, sockets, i18n, fast bignums and more. An X11 interface is available through CLX, Garnet, CLUE/CLIO. GNU CLISP runs Maxima, ACL2 and many other Common Lisp packages. WWW: http://www.gnu.org/software/clisp/ Submitted by: KIRIYAMA Kazuhiko <kiri@kx.openedu.org>
41 lines
908 B
C
41 lines
908 B
C
--- modules/fastcgi/fastcgi_wrappers.c.orig 2018-11-12 00:05:07 UTC
|
|
+++ modules/fastcgi/fastcgi_wrappers.c
|
|
@@ -41,7 +41,26 @@ extern char **environ;
|
|
|
|
/* 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);
|
|
@@ -93,7 +112,11 @@ char ** fcgi_env() {
|
|
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);
|
|
}
|
|
}
|