Mercurial > hg > xemacs-beta
comparison src/emodules.c @ 1632:64eaceca611d
[xemacs-hg @ 2003-08-19 02:07:03 by james]
Enable module building and running on Cygwin and MinGW.
author | james |
---|---|
date | Tue, 19 Aug 2003 02:07:16 +0000 |
parents | 20547bbdcf1e |
children | 9fc738581a9d |
comparison
equal
deleted
inserted
replaced
1631:1bf7b032a45d | 1632:64eaceca611d |
---|---|
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with XEmacs; see the file COPYING. If not, write to | 17 along with XEmacs; see the file COPYING. If not, write to |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 Boston, MA 02111-1307, USA. */ | 19 Boston, MA 02111-1307, USA. */ |
20 | 20 |
21 /* This gross hack is so that we can make DEFVAR_foo register with the | |
22 portable dumper in core, but not do so in modules. Since the hackery to do | |
23 that is in emodules.h, we have to turn it off for this file. */ | |
24 #define EMODULES_DO_NOT_REDEFINE | |
25 #include "emodules.h" | 21 #include "emodules.h" |
26 #include "sysdll.h" | 22 #include "sysdll.h" |
27 | 23 |
28 #ifdef HAVE_SHLIB | 24 #ifdef HAVE_SHLIB |
29 | 25 |
76 specified, then the module is only loaded if its internal name matches | 72 specified, then the module is only loaded if its internal name matches |
77 the NAME specified. If VERSION is specified, then the module is only | 73 the NAME specified. If VERSION is specified, then the module is only |
78 loaded if it matches that VERSION. This function will check to make | 74 loaded if it matches that VERSION. This function will check to make |
79 sure that the same module is not loaded twice. Modules are searched | 75 sure that the same module is not loaded twice. Modules are searched |
80 for in the same way as Lisp files, except that the valid file | 76 for in the same way as Lisp files, except that the valid file |
81 extensions are `.so', `.dll' or `.ell'. | 77 extensions are `.so', `.dll', `.ell', or `.dylib'. |
82 | 78 |
83 All symbols in the shared module must be completely resolved in order | 79 All symbols in the shared module must be completely resolved in order |
84 for this function to be successful. Any modules which the specified | 80 for this function to be successful. Any modules which the specified |
85 FILE depends on will be automatically loaded. You can determine which | 81 FILE depends on will be automatically loaded. You can determine which |
86 modules have been loaded as dynamic shared objects by examining the | 82 modules have been loaded as dynamic shared objects by examining the |
526 { | 522 { |
527 Bytecount len = strlen (symname); | 523 Bytecount len = strlen (symname); |
528 Lisp_Object sym = oblookup (Vobarray, (const Ibyte *)symname, len); | 524 Lisp_Object sym = oblookup (Vobarray, (const Ibyte *)symname, len); |
529 Lisp_Subr *subr; | 525 Lisp_Subr *subr; |
530 | 526 |
531 if (SYMBOLP(sym)) | 527 /* Skip autoload cookies */ |
532 { | 528 if (SYMBOLP (sym) && SUBRP (XSYMBOL (sym)->function)) |
533 subr = XSUBR( XSYMBOL(sym)->function); | 529 { |
530 subr = XSUBR (XSYMBOL (sym)->function); | |
534 subr->doc = xstrdup (doc); | 531 subr->doc = xstrdup (doc); |
535 } | 532 } |
536 /* | 533 /* |
537 * FIXME: I wish there was some way to avoid the xstrdup(). Is it | 534 * FIXME: I wish there was some way to avoid the xstrdup(). Is it |
538 * possible to just set a pointer to the string, or somehow create a | 535 * possible to just set a pointer to the string, or somehow create a |