From: <cli...@li...> - 2005-11-12 04:10:19
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/modules/syscalls posix.lisp,1.50,1.51 (Sam Steingold) 2. clisp/src ChangeLog,1.5075,1.5076 (Sam Steingold) 3. clisp/doc impext.xml,1.410,1.411 (Sam Steingold) 4. clisp/src ChangeLog,1.5076,1.5077 (Sam Steingold) 5. clisp/modules/syscalls calls.c,1.156,1.157 (Sam Steingold) 6. clisp/src ChangeLog,1.5077,1.5078 (Sam Steingold) 7. clisp/modules/rawsock rawsock.c,1.73,1.74 (Sam Steingold) --__--__-- Message: 1 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/syscalls posix.lisp,1.50,1.51 Date: Fri, 11 Nov 2005 21:24:55 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/syscalls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14731/modules/syscalls Modified Files: posix.lisp Log Message: (service): do not check type of PROTOCOL Index: posix.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/posix.lisp,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- posix.lisp 10 Nov 2005 15:29:15 -0000 1.50 +++ posix.lisp 11 Nov 2005 21:24:53 -0000 1.51 @@ -280,7 +280,6 @@ #+unix "/etc/services" #+win32 (string-concat (getenv "WINDIR") "/system32/drivers/etc/services")) (defun service (&optional service-name protocol) - (assert (typep protocol 'string)) (unless (boundp '*services*) (setq *services* (with-open-file (in *services-file* :direction :input --__--__-- Message: 2 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.5075,1.5076 Date: Fri, 11 Nov 2005 21:24:55 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14731/src Modified Files: ChangeLog Log Message: (service): do not check type of PROTOCOL Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.5075 retrieving revision 1.5076 diff -u -d -r1.5075 -r1.5076 --- ChangeLog 10 Nov 2005 15:41:02 -0000 1.5075 +++ ChangeLog 11 Nov 2005 21:24:51 -0000 1.5076 @@ -1,3 +1,7 @@ +2005-11-11 Sam Steingold <sd...@gn...> + + * modules/syscalls/posix.lisp (service): do not check type of PROTOCOL + 2005-11-10 Sam Steingold <sd...@gn...> * modules/rawsock/rawsock.c [win32]: include <ws2tcpip.h> for --__--__-- Message: 3 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/doc impext.xml,1.410,1.411 Date: Fri, 11 Nov 2005 21:25:47 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15064/doc Modified Files: impext.xml Log Message: (socket-ex-client): do not call shutdown Index: impext.xml =================================================================== RCS file: /cvsroot/clisp/clisp/doc/impext.xml,v retrieving revision 1.410 retrieving revision 1.411 diff -u -d -r1.410 -r1.411 --- impext.xml 10 Nov 2005 17:10:00 -0000 1.410 +++ impext.xml 11 Nov 2005 21:25:43 -0000 1.411 @@ -4487,7 +4487,6 @@ ;; &http; requires &dos-k; &line-term; (&with-open-stream; (socket (&so-connect; port host &extfmt; &dos-k;)) (&format; socket "GET ~A HTTP/1.0~2%" page) - (&sost-shut; socket &output-k;) ;; dump the whole thing - header+data - into the output file (&with-open-file; (out file :direction :output) (&loop; :for line = (&read-line; socket nil nil) :while line @@ -4495,7 +4494,6 @@ (&defun; wget-binary (host page file &optional-amp; (port 80)) (&with-open-stream; (socket (&so-connect; port host &extfmt; &dos-k;)) (&format; socket "GET ~A HTTP/1.0~2%" page) - (&sost-shut; socket &output-k;) (&loop; :with content-length :and marker = "Content-length: " :for line = (&read-line; socket nil nil) ;; header is separated from the data with a blank line @@ -4672,13 +4670,12 @@ the &sost-r;.</simpara>&sost-raw-too;</listitem></varlistentry> <varlistentry id="sost-shut"><term><code>(&sost-shut; &sost-r; &direction-r;)</code></term> - <listitem><simpara>Some Internet protocols, such as &http;, provide for - closing the connection in one &direction-r; - using <function role="unix">shutdown</function>. + <listitem><simpara>Some protocols, provide for closing the connection + in one &direction-r; using <function role="unix">shutdown</function>. This function provides an interface to this &unix; system call. - &direction-r; should be &input-k; or &output-k;. - Note that you should still call &close; after you are done with your - &sost-r;; this is best accomplished by using &with-open-stream;.</simpara> + &direction-r; should be &input-k; or &output-k;. Note that you + should still call &close; after you are done with your &sost-r;; this + is best accomplished by using &with-open-stream;.</simpara> <para>All &socket-stream;s are &bidi-s;s (i.e., both &input-stream-p; and &output-stream-p; return &t; for them). &sost-shut; <emphasis>breaks</emphasis> this and turns its argument --__--__-- Message: 4 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.5076,1.5077 Date: Fri, 11 Nov 2005 21:28:23 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15554/src Modified Files: ChangeLog Log Message: (module__syscalls__init_function_2): moved ole32 and kernel32 here (not static anymore) Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.5076 retrieving revision 1.5077 diff -u -d -r1.5076 -r1.5077 --- ChangeLog 11 Nov 2005 21:24:51 -0000 1.5076 +++ ChangeLog 11 Nov 2005 21:28:20 -0000 1.5077 @@ -1,5 +1,10 @@ 2005-11-11 Sam Steingold <sd...@gn...> + * modules/syscalls/calls.c (module__syscalls__init_function_2): + moved ole32 and kernel32 here (not static anymore) + +2005-11-11 Sam Steingold <sd...@gn...> + * modules/syscalls/posix.lisp (service): do not check type of PROTOCOL 2005-11-10 Sam Steingold <sd...@gn...> --__--__-- Message: 5 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/syscalls calls.c,1.156,1.157 Date: Fri, 11 Nov 2005 21:28:23 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/syscalls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15554/modules/syscalls Modified Files: calls.c Log Message: (module__syscalls__init_function_2): moved ole32 and kernel32 here (not static anymore) Index: calls.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/calls.c,v retrieving revision 1.156 retrieving revision 1.157 diff -u -d -r1.156 -r1.157 --- calls.c 10 Nov 2005 15:29:15 -0000 1.156 +++ calls.c 11 Nov 2005 21:28:21 -0000 1.157 @@ -2246,7 +2246,6 @@ LPDWORD lpNumberOfBytesWritten, BOOL bAbort, BOOL bProcessSecurity, LPVOID *lpContext); static BackupWriteFuncType BackupWriteFunc = NULL; -static HMODULE kernel32 = NULL; #endif #if defined(WIN32_NATIVE) || defined(UNIX_CYGWIN32) @@ -2254,13 +2253,12 @@ DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, void * reserved1, void * reserved2, REFIID riid, void ** ppObjectOpen); static StgOpenStorageExFuncType StgOpenStorageExFunc = NULL; -static HMODULE ole32 = NULL; #endif void module__syscalls__init_function_2 (module_t* module); void module__syscalls__init_function_2 (module_t* module) { #if defined(WIN32_NATIVE) - kernel32 = LoadLibrary ("kernel32.dll"); + HMODULE kernel32 = LoadLibrary ("kernel32.dll"); if (kernel32 != NULL) { CreateHardLinkFunc = (CreateHardLinkFuncType) GetProcAddress (kernel32, "CreateHardLinkA"); @@ -2277,10 +2275,11 @@ } #endif #if defined(WIN32_NATIVE) || defined(UNIX_CYGWIN32) - ole32 = LoadLibrary ("ole32.dll"); - if (ole32 != NULL) - StgOpenStorageExFunc = (StgOpenStorageExFuncType) - GetProcAddress (ole32, "StgOpenStorageEx"); + { HMODULE ole32 = LoadLibrary ("ole32.dll"); + if (ole32 != NULL) + StgOpenStorageExFunc = (StgOpenStorageExFuncType) + GetProcAddress (ole32, "StgOpenStorageEx"); + } #endif } --__--__-- Message: 6 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.5077,1.5078 Date: Fri, 11 Nov 2005 21:34:44 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17153/src Modified Files: ChangeLog Log Message: (GETNAMEINFO, GETADDRINFO): support woe32 Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.5077 retrieving revision 1.5078 diff -u -d -r1.5077 -r1.5078 --- ChangeLog 11 Nov 2005 21:28:20 -0000 1.5077 +++ ChangeLog 11 Nov 2005 21:34:42 -0000 1.5078 @@ -1,5 +1,14 @@ 2005-11-11 Sam Steingold <sd...@gn...> + * modules/rawsock/rawsock.c (GETNAMEINFO, GETADDRINFO): support woe32: + (error_missing): new function + (getnameinfo_t, getaddrinfo_t, freeaddrinfo_t): new types + (my_getnameinfo, my_getaddrinfo, my_freeaddrinfo): new functions + (getnameinfo_f, getaddrinfo_f, freeaddrinfo_f): new variables + (module__rawsock__init_function_2): init them + +2005-11-11 Sam Steingold <sd...@gn...> + * modules/syscalls/calls.c (module__syscalls__init_function_2): moved ole32 and kernel32 here (not static anymore) --__--__-- Message: 7 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/rawsock rawsock.c,1.73,1.74 Date: Fri, 11 Nov 2005 21:34:44 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/rawsock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17153/modules/rawsock Modified Files: rawsock.c Log Message: (GETNAMEINFO, GETADDRINFO): support woe32 Index: rawsock.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/rawsock/rawsock.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- rawsock.c 10 Nov 2005 15:37:02 -0000 1.73 +++ rawsock.c 11 Nov 2005 21:34:42 -0000 1.74 @@ -7,6 +7,10 @@ * <http://www.opengroup.org/onlinepubs/007908799/xns/syssocket.h.html> */ +#if defined(_WIN32) +# undef UNICODE +#endif + #include "clisp.h" #include "config.h" @@ -63,7 +67,8 @@ #if defined(HAVE_POLL_H) # include <poll.h> #endif -#if defined(HAVE_WINSOCK2_H) /* woe32 suckety sucks */ +#if defined(HAVE_WINSOCK2_H) /* woe32 suckety sucks */ +# undef UNICODE # include <winsock2.h> # include <ws2tcpip.h> # define SETSOCKOPT_ARG_T char* @@ -674,7 +679,24 @@ VALUES0; } +#if defined(WIN32_NATIVE) +nonreturning_function(static, error_missing, (object function)) { + pushSTACK(function); pushSTACK(TheSubr(subr_self)->name); + fehler(error,GETTEXT("~S: your ws2_32.dll does not implement ~S")); +} +#endif + #if defined(HAVE_GETNAMEINFO) || defined(WIN32_NATIVE) +#if defined(WIN32_NATIVE) +typedef int (WSAAPI *getnameinfo_t) (const struct sockaddr*,socklen_t,char*, + DWORD,char*,DWORD,int); +static int WSAAPI my_getnameinfo (const struct sockaddr* sa,socklen_t sl, + char* nd,DWORD ndl,char* sv,DWORD svl,int f) +{ error_missing(`"getnameinfo"`); } +static getnameinfo_t getnameinfo_f = &my_getnameinfo; +#else +# define getnameinfo_f getnameinfo +#endif DEFFLAGSET(getnameinfo_flags, NI_NOFQDN NI_NUMERICHOST NI_NAMEREQD \ NI_NUMERICSERV NI_NUMERICSCOPE NI_DGRAM) DEFUN(RAWSOCK:GETNAMEINFO, sockaddr &key NOFQDN NUMERICHOST NAMEREQD \ @@ -686,13 +708,29 @@ PROT_READ); char node[BUFSIZ], service[BUFSIZ]; begin_system_call(); - if (getnameinfo(sa,size,node,BUFSIZ,service,BUFSIZ,flags)) OS_error(); + if (getnameinfo_f(sa,size,node,BUFSIZ,service,BUFSIZ,flags)) OS_error(); end_system_call(); pushSTACK(asciz_to_string(service,GLO(misc_encoding))); VALUES2(asciz_to_string(node,GLO(misc_encoding)),popSTACK()); } #endif #if (defined(HAVE_GETADDRINFO) && defined(HAVE_FREEADDRINFO)) || defined(WIN32_NATIVE) +#if defined(WIN32_NATIVE) +typedef void (WSAAPI *freeaddrinfo_t) (struct addrinfo*); +static void WSAAPI my_freeaddrinfo (struct addrinfo* ai) +{ error_missing(`"freeaddrinfo"`); } +typedef int (WSAAPI *getaddrinfo_t) + (const char*,const char*, const struct addrinfo*, struct addrinfo**); +static freeaddrinfo_t freeaddrinfo_f = &my_freeaddrinfo; +static int WSAAPI my_getaddrinfo (const char* nd,const char* sv, + const struct addrinfo* hints, + struct addrinfo** ret) +{ error_missing(`"getaddrinfo"`); } +static getaddrinfo_t getaddrinfo_f = &my_getaddrinfo; +#else +# define getaddrinfo_f getaddrinfo +# define freeaddrinfo_f freeaddrinfo +#endif DEFFLAGSET(addrinfo_flags,AI_PASSIVE AI_CANONNAME AI_NUMERICHOST \ AI_NUMERICSERV AI_V4MAPPED AI_ALL AI_ADDRCONFIG) DEFCHECKER(check_addrinfo_flags,prefix=AI,default=0,bitmasks=both, \ @@ -709,12 +747,12 @@ if (missingp(STACK_0)) { if (missingp(STACK_1)) { begin_system_call(); - if (getaddrinfo(NULL,NULL,&hints,&ret)) OS_error(); + if (getaddrinfo_f(NULL,NULL,&hints,&ret)) OS_error(); end_system_call(); } else { with_string_0(check_string(STACK_1),GLO(misc_encoding),node, { begin_system_call(); - if (getaddrinfo(node,NULL,&hints,&ret)) OS_error(); + if (getaddrinfo_f(node,NULL,&hints,&ret)) OS_error(); end_system_call(); }); } @@ -722,12 +760,12 @@ with_string_0(check_string(STACK_0),GLO(misc_encoding),service, { if (missingp(STACK_1)) { begin_system_call(); - if (getaddrinfo(NULL,service,&hints,&ret)) OS_error(); + if (getaddrinfo_f(NULL,service,&hints,&ret)) OS_error(); end_system_call(); } else { with_string_0(check_string(STACK_1),GLO(misc_encoding),node, { begin_system_call(); - if (getaddrinfo(node,service,&hints,&ret)) OS_error(); + if (getaddrinfo_f(node,service,&hints,&ret)) OS_error(); end_system_call(); }); } @@ -747,7 +785,7 @@ : asciz_to_string(tmp->ai_canonname,GLO(misc_encoding))); funcall(`RAWSOCK::MAKE-ADDRINFO`,6); pushSTACK(value1); } - if (ret) { begin_system_call(); freeaddrinfo(ret); end_system_call(); } + if (ret) { begin_system_call(); freeaddrinfo_f(ret); end_system_call(); } VALUES1(listof(valcount)); skipSTACK(2); } #endif @@ -1347,3 +1385,15 @@ VALUES1(fixnum(result)); skipSTACK(3); } + +void module__rawsock__init_function_2 (module_t* module); +void module__rawsock__init_function_2 (module_t* module) { +#if defined(WIN32_NATIVE) + HMODULE ws2 = LoadLibrary("ws2_32.dll"); + if (ws2 != NULL) { + freeaddrinfo_f = (freeaddrinfo_t) GetProcAddress(ws2,"freeaddrinfo"); + getaddrinfo_f = (getaddrinfo_t) GetProcAddress(ws2,"getaddrinfo"); + getnameinfo_f = (getnameinfo_t) GetProcAddress(ws2,"getnameinfo"); + } +#endif +} --__--__-- _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest |