diff --git a/NT/tools/ar b/NT/tools/ar index 95c9b09b932c34f7753ce3c7b7e8f8423bb87603..a0a3eac7db0133d439b202cf3262055ad8f0dc25 100755 --- a/NT/tools/ar +++ b/NT/tools/ar @@ -13,8 +13,8 @@ shift OUTPUT=$1 shift -case "$CC" in - *rntcl|*rntecl) +case "`echo $CC`" in + *rntcl*|*rntecl*) case "E$OPTIONS" in *x*) ofixed="`fixpath $OUTPUT`" @@ -43,7 +43,7 @@ case "$CC" in esac ;; - *rntcc) + *rntcc*) XOPTS="-b -c" @@ -108,7 +108,7 @@ case "$CC" in ;; *) - echo Unknown C compiler: $CC + echo "Unknown C compiler: \"$CC\"" exit 1 ;; esac diff --git a/NT/tools/lib.pike b/NT/tools/lib.pike index c5dae94b758409fb036ad3b9f6a148e7c424664d..5355af3ff064716f0d42f2e1af42199f805fc116 100644 --- a/NT/tools/lib.pike +++ b/NT/tools/lib.pike @@ -206,6 +206,9 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent) object rl=Stdio.Readline(); string prompt=""; + array from_handler= ({"\r\n","\n\r","\n"}); + array to_handler= ({"\n\r","\n\r","\n\r"}); + string read() { string tmp=rl->read(); @@ -219,16 +222,42 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent) int write(string s) { - s=prompt+s-"\r"; - array lines=s/"\n"; - rl->write(lines[..sizeof(s)-2]*"\n"); - rl->set_prompt(prompt=lines[-1]); + /* This provides some very basic terminal emulation */ + /* We need to understand \r, \n, and \b */ +// werror("%O\n",s); + s=replace(prompt+s,from_handler,to_handler); + + array tmp=s/"/b"; + + array lines=s/"\r"; + foreach(lines, string l) + { + if(strlen(l) && l[-1]=='\n') + { + rl->write(l); + prompt=""; + }else{ + prompt=l; + } + } + + rl->set_prompt(prompt); return strlen(s); } void create() { rl->enable_history(512); + for(int e=0;e<256;e++) + { + switch(e) + { + case '\n': case '\r': break; + default: + from_handler+=({ sprintf("%c\b",e) }); + to_handler+=({ sprintf("") }); + } + } } }; @@ -252,13 +281,19 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent) thread_create(lambda(object f) { int killed; + int last_killed; void killme() { - if(!killed) + if(last_killed == time()) return; + last_killed=time(); + werror("\r\n** Interupted\r\n"); + if(!killed || killed+5 > time()) { - werror("\r\n** Interupted\r\n"); f->write_oob("x"); - killed=1; + if(!killed) + killed=time(); + }else{ + exit(1); } }; diff --git a/NT/tools/rntcl b/NT/tools/rntcl index be80a032f510e51b9ee570a264022665333c32cc..656894ae990add69e42ea537d6f1bf160646138a 100755 --- a/NT/tools/rntcl +++ b/NT/tools/rntcl @@ -90,6 +90,7 @@ int main(int argc, string *argv) switch(option[1]) { case "hare": + case "hared": share=1; target="dll"; break; @@ -220,7 +221,7 @@ int main(int argc, string *argv) else output=remove_ext(argv[1])+".dll"; -// cflags+=({"-MD" + (debug?"d":"") }); + cflags+=({"-MD" + (debug?"d":""), "-LD" + (debug?"d":"")}); wantfile=output; break; diff --git a/bin/fake_dynamic_load.pike b/bin/fake_dynamic_load.pike new file mode 100755 index 0000000000000000000000000000000000000000..af47c8f8f13d298b5d36a63955ab5a583d039a27 --- /dev/null +++ b/bin/fake_dynamic_load.pike @@ -0,0 +1,408 @@ +#!/usr/local/bin/pike + +#define PC Parser.C + +#ifdef OLD +import "."; +#define PC .C +#endif + +string strip(string s) +{ + array(string) tmp=s/"."; + switch(tmp[-1]) + { + case "protos": + case "pp": + case "pph": + case "h": + case "c": + case "cmod": + tmp[-1]="pp"; + s=tmp*"."; + } + s=replace(s,"_t.","."); /* magic */ + s=replace(s,"\\\\","/"); + s=basename(lower_case(s)); + return s; +} + +string low_strip_other_files(string data, string s) +{ + if(!data) + { + werror("File %s missing?\n",s); + return 0; + } + + data-="\r"; + array tmp=data/"\n#"; + string ret=tmp[0]; + string cf=s; + int cl=1; + + s=strip(s); + foreach(tmp[1..], string x) + { + string file; + if(sscanf(x,"line %*d \"%s\"", file) || + sscanf(data," %*d \"%s\"", file)) + if(file) cf=strip(file); + + + if(cf == s) ret+="#"+x; + } + return ret; +} + +string my_read_file(string s) +{ + if(getenv("SRCDIR")) + { + string tmp=combine_path(getenv("SRCDIR"),s); + if(Stdio.file_size(tmp) != -1) s=tmp; + } + return Stdio.read_file(s); +} + + +array flatten(array a) +{ + array ret=({}); + foreach(a, a) ret+=arrayp(a)?flatten(a):({a}); + return ret; +} + +string arg(array x, int num) +{ + if( sizeof(x) <= ( num >= 0 ? num : ~num )) return ""; + return (string) ( arrayp(x[num]) ? x[num][0] : x[num] ); +} + +array(string) fixarg(array s) +{ +// werror("%O\n",s); + if(sizeof(s)>1) + { + switch(arg(s,-1)) + { + case "void": + case "int": + case "char": + case "unsigned": + case "*": + case "short": + case "long": + case "float": + case "double": + case "...": + case "(": + break; + + default: + switch(arg(s,-2)) + { + case "union": + case "enum": + case "struct": + case "const": + case "register": + break; + + default: + s=s[..sizeof(s)-2]; + } + } + } + + return flatten(s); +} + +string implode(array(string) s) +{ + string ret=" "; + foreach(flatten(s), mixed s) + { + switch(ret[-1]) + { + case 'a'..'z': + case 'A'..'Z': + case '_': + case '0'..'9': + switch(((string)s)[0]) + { + case 'a'..'z': + case 'A'..'Z': + case '_': + case '0'..'9': + ret+=" "; + } + } + ret+=(string)s; + } + return ret[1..]; +} + + +array classify(array s) +{ +// werror("%O\n",s); +// werror("Classifying.."); + array data=({}); + s=s/({"PMOD_PROTO"}) * ({ "PMOD_EXPORT","PPROTO" }); +// werror("CLASSIFY %d\n",sizeof(s/ ({"PMOD_EXPORT"}))); + foreach((s/ ({"PMOD_EXPORT"}))[1..], array expr) + { + int a; + int proto=0; + int var=1; + + if(expr[0]=="PPROTO") + { + expr=expr[1..]; + proto=1; + } + + for(a=0;a<sizeof(expr);a++) + { + if(arrayp(expr[a])) + { + if(sizeof(expr[a])) + { + switch((string)(expr[a][0])) + { + default: continue; + case "(": var=0;continue; + case "{": break; + } + break; + } + }else{ + switch((string) expr[a]) + { + default: continue; + case ";": if(!proto && !var) a=0; + case "=": + case "__attribute__": break; + } + break; + } + } + expr=expr[..a-1]; + if(!sizeof(expr)) continue; +// werror("Considering %O\n",expr[0..4]); + while(1) + { +// werror("FN: %O\n",expr); + switch((string)expr[0]) + { + case "extern": + expr=expr[1..]; + continue; + + break; + + case "typedef": + case "typdef": + break; /* ignored */ + + case "struct": + case "union": + case "enum": +// werror("%O\n",expr); + if(sizeof(expr) <= 2) break; /* Forward decl */ + default: +// werror(" %O\n",expr); + int ptr=sizeof(expr)-1; + while(arrayp(expr[ptr]) && expr[ptr][0]=='[') ptr--; + + if(arrayp(expr[ptr])) + { + if("(" != (string) (expr[ptr][0]) ) break; /* Ignore structs and unions */ + +// werror("GURKA!\n"); + array args=map(expr[ptr][1..sizeof(expr[ptr])-2]/({","}),fixarg); + string rettype=implode(expr[..sizeof(expr)-3]); +// werror("%O\n",expr); + mixed name=expr[-2]; + string location; + if(arrayp(name)) + { + location=name[0]->file+":"+name[0]->line; + name=PC.simple_reconstitute(name); + }else{ + location=name->file+":"+name->line; + name=(string)name; + } + data+=({ ([ + "class": "function", + "rettype": rettype, + "location":location, + "name": name, + "args": args, + "post_type":implode(expr[ptr+1..]), + "ptrtype":sprintf("%s(*)(%s)",rettype,implode(args*({","}))), + "proto":sprintf("%s %s(%s)",rettype,name,implode(args*({","}))), + ]) }); + }else{ +// werror("FNORD\n"); + string type=implode(expr[..sizeof(expr)-2]); + data+=({ ([ + "arg_type":"", + "post_type":implode(expr[ptr+1..]), + "class": "variable", + "ptrtype": type+"*", + "type": type, + "location":sprintf("%s:%d",expr[ptr]->file||"",expr[ptr]->line), + "name": expr[ptr], + "proto":implode(expr), + ]) }); + } + } + + break; + } + + } + return data; +} + +array prototypes=({}); + +void low_process_file(mixed data, string file) +{ + if(mixed err=catch { + data=low_strip_other_files(data,file); + if(!data || !sizeof(data)) return; + data=PC.split(data); + data=PC.tokenize(data); + if(!data || !sizeof(data)) return; + data=PC.hide_whitespaces(data); + data=PC.strip_line_statements(data); + array data=PC.group(data); + if(sizeof(data) && strlen( (string) (data[0]) )) + { + switch(((string)data[0])[0] ) + { + case ' ': case '\n': case '\t': case '\14': case '\r': + data=data[1..]; + } + } + data=classify(data); + prototypes+=data; + }) throw(err); +// werror("%s Done\n",file); +} + +void process_file(string file) +{ +// werror("Processing %s\n",file); + low_process_file(my_read_file(file), file); +} + +int main(int argc, string *argv) +{ + + int protos_only; + int run_cpp; + int num_threads=1; + /* Hmm, threaded operation doesn't seem to work, maybe + * my windoze machine needs more memory? + */ + + foreach(Getopt.find_all_options(argv,aggregate( + ({"protos",Getopt.NO_ARG,({"--protos"})}), + ({"run_cpp",Getopt.NO_ARG,({"--cpp"})}), + ({"threads",Getopt.HAS_ARG,({"--threads"})}), + ),1),array opt) + { + switch(opt[0]) + { + case "protos": protos_only++; break; + case "run_cpp": run_cpp++; break; + case "threads": num_threads=(int)opt[1]; break; + } + } + + argv=Getopt.get_args(argv,1); + + if(run_cpp) + { + object f=Stdio.File(); + object p=f->pipe(Stdio.PROP_IPC); + object proc=Process.create_process(argv[1..], (["stdout":p])); + + destruct(p); + string data=f->read(0x7fffffff); + if(int x=proc->wait()) + { + werror("CPP failed with error code %d\n",x); + exit(1); + } + low_process_file(data, argv[-1]); + }else{ + +#if constant(thread_create) + if(num_threads >1) + { + werror("Using %d threads\n",num_threads); + Thread.Fifo fifo=Thread.Fifo(); + void worker() + { + while(string f=fifo->read()) process_file(f); + }; + array threads=allocate(num_threads, thread_create)(worker); + foreach(argv[1..], string file) fifo->write(file); + foreach(threads, mixed t) fifo->write(0); + threads->wait(); + }else +#endif + foreach(argv[1..], string file) + process_file(file); + } + + + prototypes=values(mkmapping((array(string))(prototypes->name),prototypes)); + sort((array(string))(prototypes->name),prototypes); + + if(protos_only) + { + foreach(prototypes, mixed expr) + write("PMOD_PROTO %s;\n",expr->proto); + werror("[ %d symbol%s exported ]\n", sizeof(prototypes),sizeof(prototypes)==1?"":"s"); + exit(0); + }else{ + string ret="/* Fake prototypes */\n"; + foreach(prototypes, mixed expr) + ret+=sprintf("extern int %s;\n",expr->name); + ret+="\nvoid *PikeSymbol[]= {\n"; + foreach(prototypes, mixed expr) + ret+=sprintf(" (void *)& %s,\n",expr->name,expr->name); + ret+="0 };\n\n"; + + /* Fixme: touch module_magic.h if we need to + * recompile all the modules. + */ + + Stdio.write_file("export_functions.c",ret); + + ret="PMOD_EXPORT extern void **PikeSymbol;\n"; + int num=0; + foreach(prototypes, mixed expr) + { + ret+=sprintf("/* %s */\n#define %s (*(%s)(PikeSymbol[%d]))\n", + expr->location || "", + expr->name, + expr->ptrtype, + num++); + + if(expr->post_type!="") + werror("NOSUPP: %s %s %s\n",expr->type,expr->name,expr->post_type); + } + + Stdio.stdout->write(ret); + + werror("[ %d symbol%s exported ]\n", sizeof(prototypes),sizeof(prototypes)==1?"":"s"); + if(!sizeof(prototypes)) exit(1); + } +} diff --git a/bin/fixdepends.sh b/bin/fixdepends.sh index 40b923212ad0d4c2936bfde684d4db8284ab0f99..2308a7bb66cd202bdb53fdc85647821041573896 100755 --- a/bin/fixdepends.sh +++ b/bin/fixdepends.sh @@ -1,6 +1,6 @@ #!/bin/sh -sed -e "s@ $1/\([-a-zA-Z0-9.,_]*\)@ \$(SRCDIR)/\1@g" >$1/dependencies +sed -e "s@ $1/\([-a-zA-Z0-9.,_]*\)@ \$(SRCDIR)/\1@g" | sed 's/^\([-a-zA-Z0-9.,_]*\)\.o: /\1.o \1.protos: /g' >$1/dependencies #sed -e "s@/./@/@g #s@$1/\([-a-zA-Z0-9.,_]*\)@\$(SRCDIR)/\1@g" >$1/dependencies diff --git a/bin/install.pike b/bin/install.pike index 0abd5d1273a3c2fc00f98702ca927851dd98cca7..d50d142b5eab1b7df044b5f8ce840c160a04d4f6 100644 --- a/bin/install.pike +++ b/bin/install.pike @@ -135,10 +135,14 @@ void status_clear() } } -int mkdirhier(string dir) + +mapping already_created=([]); +int mkdirhier(string orig_dir) { int tomove; if(export) return 1; + string dir=orig_dir; + if(already_created[orig_dir]) return 1; if(dir=="" || (strlen(dir)==2 && dir[-1]==':')) return 1; dir=fakeroot(dir); @@ -149,7 +153,7 @@ int mkdirhier(string dir) if(s) { if(s[1]<0) - return 1; + return already_created[orig_dir]=1; if(glob("*.pmod",dir)) { @@ -174,7 +178,7 @@ int mkdirhier(string dir) if(!mv(dir+".tmp",dir+"/module.pmod")) fail("mv(%s,%s)",dir+".tmp",dir+"/module.pmod"); - return 1; + return already_created[orig_dir]=1; } int compare_files(string a,string b) diff --git a/bin/precompile.pike b/bin/precompile.pike index 7d7781e54595f5f99f96f86866e6f8bd8c9aad03..363bc4b3fc5fa29280082412ece647043e8302ea 100644 --- a/bin/precompile.pike +++ b/bin/precompile.pike @@ -460,7 +460,7 @@ array convert(array x, string base) ret+=({ sprintf("#define f_%s_defined\n",name), - sprintf("void f_%s(INT32 args) ",name), + sprintf("PMOD_EXPORT void f_%s(INT32 args) ",name), "{","\n", }); diff --git a/lib/modules/Parser.pmod/C.pmod b/lib/modules/Parser.pmod/C.pmod index afbd72d335198db3ad4c5f5f5fbcc0ae1a3de992..13064efabb248944fa97819bdcf92a84944d0bfb 100644 --- a/lib/modules/Parser.pmod/C.pmod +++ b/lib/modules/Parser.pmod/C.pmod @@ -85,12 +85,15 @@ array(string) split(string data) break; default: - werror("Unknown token %O\n",data[pos..pos+5]); + werror("%O\n",ret); + werror("Unknown token %O\n",data[pos..pos+20]); exit(1); case '`': while(data[pos]=='`') data[pos]++; + case '\\': pos++; continue; /* IGNORED */ + case '/': case '{': case '}': case '[': case ']': @@ -156,7 +159,7 @@ array(string) split(string data) case '\'': pos++; if(data[pos]=='\\') pos++; - pos=search(data, "'", pos)+1; + pos=search(data, "'", pos+1)+1; break; case '"': diff --git a/src/modules/CommonLog/clf.c b/src/modules/CommonLog/clf.c index 8f501d3bf0f93903f98f64031f4bb02e039236b7..1484cfbecd763c62e4521d39e602c6f659aea32f 100644 --- a/src/modules/CommonLog/clf.c +++ b/src/modules/CommonLog/clf.c @@ -1,6 +1,6 @@ - +/* MUST BE FIRST */ #include "global.h" -RCSID("$Id: clf.c,v 1.2 2000/03/27 00:04:48 grubba Exp $"); +RCSID("$Id: clf.c,v 1.3 2000/07/28 07:11:47 hubbe Exp $"); #include "fdlib.h" #include "stralloc.h" #include "pike_macros.h" @@ -15,12 +15,13 @@ RCSID("$Id: clf.c,v 1.2 2000/03/27 00:04:48 grubba Exp $"); #include <stdio.h> #include <fcntl.h> +/* MUST BE LAST */ +#include "module_magic.h" + /** Forward declarations of functions implementing Pike functions **/ static void f_read_clf( INT32 args ); -extern int fd_from_object(struct object *o); - /** Global tables **/ diff --git a/src/modules/Gdbm/gdbmmod.c b/src/modules/Gdbm/gdbmmod.c index d1bd203418114674ee34b961d93785a637338eee..45a4608b00f0e9180edc4d6504846dad78ddab6c 100644 --- a/src/modules/Gdbm/gdbmmod.c +++ b/src/modules/Gdbm/gdbmmod.c @@ -4,14 +4,12 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: gdbmmod.c,v 1.10 2000/07/07 14:02:12 grubba Exp $"); +RCSID("$Id: gdbmmod.c,v 1.11 2000/07/28 07:11:52 hubbe Exp $"); #include "gdbm_machine.h" #include "threads.h" /* Todo: make sure only one thread accesses the same gdbmmod */ -#if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM) - #include "interpret.h" #include "svalue.h" #include "stralloc.h" @@ -19,6 +17,11 @@ RCSID("$Id: gdbmmod.c,v 1.10 2000/07/07 14:02:12 grubba Exp $"); #include "object.h" #include "pike_macros.h" +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + +#if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM) + #include <gdbm.h> #ifdef _REENTRANT diff --git a/src/modules/Gettext/gettext.c b/src/modules/Gettext/gettext.c index 2a1474aa100c51b22c33f932e8a70607786ee3bf..d3f1f61e4a7ae35225ea3e1e1fe940367dac6403 100644 --- a/src/modules/Gettext/gettext.c +++ b/src/modules/Gettext/gettext.c @@ -20,7 +20,10 @@ #include "mapping.h" #include "module_support.h" -RCSID("$Id: gettext.c,v 1.3 2000/02/29 20:41:13 neotron Exp $"); +/* This must be included last */ +#include "module_magic.h" + +RCSID("$Id: gettext.c,v 1.4 2000/07/28 07:12:00 hubbe Exp $"); /* **! module Locale.Gettext @@ -28,7 +31,7 @@ RCSID("$Id: gettext.c,v 1.3 2000/02/29 20:41:13 neotron Exp $"); **! This module enables access to localization functions from within Pike. **! **! note -**! $Id: gettext.c,v 1.3 2000/02/29 20:41:13 neotron Exp $ +**! $Id: gettext.c,v 1.4 2000/07/28 07:12:00 hubbe Exp $ */ /******************** PUBLIC FUNCTIONS BELOW THIS LINE */ @@ -447,6 +450,8 @@ void pike_module_exit(void) } #else +#include "module_magic.h" + void pike_module_init(void) {} void pike_module_exit(void) {} diff --git a/src/modules/Gmp/mpz_glue.c b/src/modules/Gmp/mpz_glue.c index a6043800e43412b27f57cf44bad5247459c1c08b..b6135641fbe75924eb2950c7096204b44cd8ac98 100644 --- a/src/modules/Gmp/mpz_glue.c +++ b/src/modules/Gmp/mpz_glue.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: mpz_glue.c,v 1.78 2000/06/24 00:48:26 hubbe Exp $"); +RCSID("$Id: mpz_glue.c,v 1.79 2000/07/28 07:12:07 hubbe Exp $"); #include "gmp_machine.h" #if defined(HAVE_GMP2_GMP_H) && defined(HAVE_LIBGMP2) @@ -37,6 +37,9 @@ RCSID("$Id: mpz_glue.c,v 1.78 2000/06/24 00:48:26 hubbe Exp $"); #include <limits.h> +/* This must be included last! */ +#include "module_magic.h" + #ifdef _MSC_VER /* No random()... provide one for gmp * This should possibly be a configure test @@ -189,7 +192,6 @@ static void mpzmod_create(INT32 args) { #ifdef AUTO_BIGNUM /* Alert bignum.c that we have been loaded /Hubbe */ - extern int gmp_library_loaded; if(THIS_PROGRAM == bignum_program) gmp_library_loaded=1; #endif diff --git a/src/modules/Gmp/my_mpz_xor.c b/src/modules/Gmp/my_mpz_xor.c index 86ab1965360d1f61b63b3cd50ce7ac80e040b849..14e13dbd7f1d6938b84af66e879e487b8ca60f61 100644 --- a/src/modules/Gmp/my_mpz_xor.c +++ b/src/modules/Gmp/my_mpz_xor.c @@ -1,11 +1,11 @@ -/* $Id: my_mpz_xor.c,v 1.2 1999/11/09 17:01:50 mast Exp $ +/* $Id: my_mpz_xor.c,v 1.3 2000/07/28 07:12:07 hubbe Exp $ * * since xor isn't implemented by gmp (for some odd reason) */ #include "global.h" -RCSID("$Id: my_mpz_xor.c,v 1.2 1999/11/09 17:01:50 mast Exp $"); +RCSID("$Id: my_mpz_xor.c,v 1.3 2000/07/28 07:12:07 hubbe Exp $"); #include "gmp_machine.h" @@ -21,6 +21,9 @@ RCSID("$Id: my_mpz_xor.c,v 1.2 1999/11/09 17:01:50 mast Exp $"); #include "my_gmp.h" +/* This must be included last! */ +#include "module_magic.h" + void my_mpz_xor (mpz_ptr res, mpz_srcptr a, mpz_srcptr b) { /* (a&~b)|(~a&b) for now */ diff --git a/src/modules/Gz/zlibmod.c b/src/modules/Gz/zlibmod.c index cb4cf1ef93839c5f1a0fba2374cf0e4275aeffae..ff6c93d574367f2c69536700b158e0e764f548e5 100644 --- a/src/modules/Gz/zlibmod.c +++ b/src/modules/Gz/zlibmod.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: zlibmod.c,v 1.28 2000/07/07 14:01:59 grubba Exp $"); +RCSID("$Id: zlibmod.c,v 1.29 2000/07/28 07:12:19 hubbe Exp $"); #include "zlib_machine.h" @@ -29,6 +29,9 @@ RCSID("$Id: zlibmod.c,v 1.28 2000/07/07 14:01:59 grubba Exp $"); #include <zlib.h> +/* This must be included last! */ +#include "module_magic.h" + struct zipper { struct z_stream_s gz; diff --git a/src/modules/HTTPLoop/accept_and_parse.c b/src/modules/HTTPLoop/accept_and_parse.c index 9619b1215276e5c5b8b0c2a8b4d60cff21387fbe..115d0ea723fb5871bf1a1e3aee8bc7ff3cb784c6 100644 --- a/src/modules/HTTPLoop/accept_and_parse.c +++ b/src/modules/HTTPLoop/accept_and_parse.c @@ -50,6 +50,9 @@ #include "util.h" #include "timeout.h" +/* This must be included last! */ +#include "module_magic.h" + static struct callback *my_callback; struct program *request_program; struct program *c_request_program; diff --git a/src/modules/HTTPLoop/cache.c b/src/modules/HTTPLoop/cache.c index cfe12688d141fe3e93714e4152a1fbe74b907b2f..ef619159468979a1b75203d2f2c2740493579839 100644 --- a/src/modules/HTTPLoop/cache.c +++ b/src/modules/HTTPLoop/cache.c @@ -26,6 +26,9 @@ #include "util.h" #include "backend.h" +/* This must be included last! */ +#include "module_magic.h" + struct cache *first_cache; static struct pike_string *free_queue[1024]; diff --git a/src/modules/HTTPLoop/configure.in b/src/modules/HTTPLoop/configure.in index c805bc754a0db6af974507f3a25cdc5a78f6dd18..ce1e0f29e9f919800329f5c96b09d6c077d9c852 100644 --- a/src/modules/HTTPLoop/configure.in +++ b/src/modules/HTTPLoop/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.4 2000/03/26 14:46:30 grubba Exp $ +# $Id: configure.in,v 1.5 2000/07/28 07:12:28 hubbe Exp $ AC_INIT(accept_and_parse.c) AC_CONFIG_HEADER(config.h) @@ -183,4 +183,11 @@ int sendfile(int out, int in, int *off, int size) fi fi +if test x"$pike_cv_sys_os" = xWindows_NT ; then + # FIXME: These look suspiciouly much like 32bit versions. + # We probably want to use 64bit versions on IA64. + LDFLAGS="-lws2_32 $LDFLAGS" +fi + + AC_OUTPUT(Makefile,echo FOO >stamp-h ) diff --git a/src/modules/HTTPLoop/filesystem.c b/src/modules/HTTPLoop/filesystem.c index cefa4d81ea9ee2e133d2db98c7e14476d888a032..6d1b9e441546f39a7fa111c3d60f12f86b6fe768 100644 --- a/src/modules/HTTPLoop/filesystem.c +++ b/src/modules/HTTPLoop/filesystem.c @@ -26,6 +26,8 @@ #include "cache.h" #include "util.h" +/* This must be included last! */ +#include "module_magic.h" struct file_ret *aap_find_file( char *s, int len, char *ho, int hlen, diff --git a/src/modules/HTTPLoop/log.c b/src/modules/HTTPLoop/log.c index cec871becd7ac844742ea13e6a92a2198b188438..f7669dded8ce102d7ed82ecb820550405e9c0127 100644 --- a/src/modules/HTTPLoop/log.c +++ b/src/modules/HTTPLoop/log.c @@ -39,6 +39,9 @@ #include "requestobject.h" #include "util.h" +/* This must be included last! */ +#include "module_magic.h" + int num_log_entries; void free_log_entry( struct log_entry *le ) { diff --git a/src/modules/HTTPLoop/requestobject.c b/src/modules/HTTPLoop/requestobject.c index 238cb96858d76a4bd2eb6c9bfc8bd694898c5a5b..443d8926499538d79aa3ed484a62149df1c4e8cf 100644 --- a/src/modules/HTTPLoop/requestobject.c +++ b/src/modules/HTTPLoop/requestobject.c @@ -1,5 +1,5 @@ /* - * $Id: requestobject.c,v 1.9 2000/07/07 14:00:55 grubba Exp $ + * $Id: requestobject.c,v 1.10 2000/07/28 07:12:28 hubbe Exp $ */ #include "global.h" @@ -41,6 +41,9 @@ #include <sys/uio.h> #endif +/* This must be included last! */ +#include "module_magic.h" + #ifdef _REENTRANT #include "accept_and_parse.h" #include "log.h" @@ -442,7 +445,6 @@ void f_aap_index_op(INT32 args) if(s == s_my_fd) { - struct object *file_make_object_from_fd(int fd, int mode, int guess); /* 0x3800 is from modules/files/file.h, * FILE_READ|FILE_WRITE|FILE_SET_CLOSE_ON_EXEC */ diff --git a/src/modules/HTTPLoop/timeout.c b/src/modules/HTTPLoop/timeout.c index 039802c02d28a509c6f28c3e66f7980f60fbbd7b..cbcb7c87304ee4a651ab6652edfa49b3f5e3c93d 100644 --- a/src/modules/HTTPLoop/timeout.c +++ b/src/modules/HTTPLoop/timeout.c @@ -39,6 +39,9 @@ #endif /* HAVE_POLL_H */ #endif /* HAVE_POLL */ +/* This must be included last! */ +#include "module_magic.h" + MUTEX_T aap_timeout_mutex; struct timeout diff --git a/src/modules/HTTPLoop/util.c b/src/modules/HTTPLoop/util.c index 7cbc2944215e3488a60ddcc771b6e1dba5976cb8..ab3b9b090381c51011d8be157d264eb86dd701eb 100644 --- a/src/modules/HTTPLoop/util.c +++ b/src/modules/HTTPLoop/util.c @@ -22,6 +22,8 @@ #include "accept_and_parse.h" #include "util.h" +/* This must be included last! */ +#include "module_magic.h" int aap_get_time(void) { diff --git a/src/modules/Image/blit.c b/src/modules/Image/blit.c index 568059b9c00dcdc88ce86aeabb80740d1c63581c..f7c7fd40f9f28d957f5cba60d92b56ffd074d5fa 100644 --- a/src/modules/Image/blit.c +++ b/src/modules/Image/blit.c @@ -1,10 +1,10 @@ -/* $Id: blit.c,v 1.42 2000/07/07 13:56:45 grubba Exp $ */ +/* $Id: blit.c,v 1.43 2000/07/28 07:12:44 hubbe Exp $ */ #include "global.h" /* **! module Image **! note -**! $Id: blit.c,v 1.42 2000/07/07 13:56:45 grubba Exp $ +**! $Id: blit.c,v 1.43 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ @@ -29,6 +29,9 @@ #include "assembly.h" #endif +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS /* Needed for NT */ diff --git a/src/modules/Image/colors.c b/src/modules/Image/colors.c index 46960e00c0f15ea605011ac834e559a4ab7c1527..beff4a0c8792a78e6e82cedd5aba46be1d09874c 100644 --- a/src/modules/Image/colors.c +++ b/src/modules/Image/colors.c @@ -1,7 +1,7 @@ /* **! module Image **! note -**! $Id: colors.c,v 1.31 2000/07/07 13:56:45 grubba Exp $ +**! $Id: colors.c,v 1.32 2000/07/28 07:12:44 hubbe Exp $ **! submodule Color **! **! This module keeps names and easy handling @@ -179,7 +179,7 @@ #include "global.h" -RCSID("$Id: colors.c,v 1.31 2000/07/07 13:56:45 grubba Exp $"); +RCSID("$Id: colors.c,v 1.32 2000/07/28 07:12:44 hubbe Exp $"); #include "image_machine.h" @@ -203,6 +203,9 @@ RCSID("$Id: colors.c,v 1.31 2000/07/07 13:56:45 grubba Exp $"); #include "image.h" #include "colortable.h" +/* This must be included last! */ +#include "module_magic.h" + static struct mapping *colors=NULL; static struct object *colortable=NULL; static struct array *colornames=NULL; diff --git a/src/modules/Image/colortable.c b/src/modules/Image/colortable.c index cb99b041b815256e2b05d76c80d88e4bf67dd65d..e6b4fdef29d8c4b7608df2f70afbfdef5b25a2dc 100644 --- a/src/modules/Image/colortable.c +++ b/src/modules/Image/colortable.c @@ -1,11 +1,11 @@ #include "global.h" -/* $Id: colortable.c,v 1.78 2000/07/07 13:56:45 grubba Exp $ */ +/* $Id: colortable.c,v 1.79 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: colortable.c,v 1.78 2000/07/07 13:56:45 grubba Exp $ +**! $Id: colortable.c,v 1.79 2000/07/28 07:12:44 hubbe Exp $ **! class Colortable **! **! This object keeps colortable information, @@ -20,7 +20,7 @@ #undef COLORTABLE_DEBUG #undef COLORTABLE_REDUCE_DEBUG -RCSID("$Id: colortable.c,v 1.78 2000/07/07 13:56:45 grubba Exp $"); +RCSID("$Id: colortable.c,v 1.79 2000/07/28 07:12:44 hubbe Exp $"); #include <math.h> /* fabs() */ @@ -45,6 +45,10 @@ RCSID("$Id: colortable.c,v 1.78 2000/07/07 13:56:45 grubba Exp $"); #include "colortable.h" #include "initstuff.h" +/* This must be included last! */ +#include "module_magic.h" + + #define WEIGHT_NEEDED (nct_weight_t)(0x10000000) #define WEIGHT_REMOVE (nct_weight_t)(0x10000001) diff --git a/src/modules/Image/configure.in b/src/modules/Image/configure.in index dccb6d69dcab4d33eee5f08b0c779c63d3f83170..53a98d0c0e0dde1bcb63fb65b3219f67722065f9 100644 --- a/src/modules/Image/configure.in +++ b/src/modules/Image/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.14 2000/07/14 21:23:10 grubba Exp $ +# $Id: configure.in,v 1.15 2000/07/28 07:12:44 hubbe Exp $ AC_INIT(image.c) AC_CONFIG_HEADER(image_machine.h) @@ -58,6 +58,13 @@ else AC_MSG_RESULT(no) fi +if test x"$pike_cv_sys_os" = xWindows_NT ; then + # FIXME: These look suspiciouly much like 32bit versions. + # We probably want to use 64bit versions on IA64. + LDFLAGS="-lws2_32 $LDFLAGS" +fi + + AC_SUBST(RANLIB) AC_CONFIG_SUBDIRS(encodings) diff --git a/src/modules/Image/dct.c b/src/modules/Image/dct.c index e8f313056d88fd5b0392402f8c93e657ee14fbe9..1f17b3d6e402d95863caec1d7dec7e70047067ab 100644 --- a/src/modules/Image/dct.c +++ b/src/modules/Image/dct.c @@ -1,9 +1,9 @@ -/* $Id: dct.c,v 1.14 1999/06/18 19:19:20 mirar Exp $ */ +/* $Id: dct.c,v 1.15 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: dct.c,v 1.14 1999/06/18 19:19:20 mirar Exp $ +**! $Id: dct.c,v 1.15 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ @@ -24,6 +24,9 @@ #include "image.h" +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS /* Needed for NT */ diff --git a/src/modules/Image/encodings/_xpm.c b/src/modules/Image/encodings/_xpm.c index 79a75fe1b7f4937de17b4c1d10bf760467b27ba3..0ee20b17f463105443193e46fb807dea8d8a119f 100644 --- a/src/modules/Image/encodings/_xpm.c +++ b/src/modules/Image/encodings/_xpm.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: _xpm.c,v 1.11 2000/06/09 22:06:05 mast Exp $"); +RCSID("$Id: _xpm.c,v 1.12 2000/07/28 07:13:06 hubbe Exp $"); #include "image_machine.h" @@ -37,6 +37,9 @@ RCSID("$Id: _xpm.c,v 1.11 2000/06/09 22:06:05 mast Exp $"); #include "image.h" #include "colortable.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_program; static int hextoint( int what ) diff --git a/src/modules/Image/encodings/any.c b/src/modules/Image/encodings/any.c index 811e307088260136aaaa08d410216a2a2a196cb4..49f9ec0c3b0a25b99c835560071ac8dd171195ae 100644 --- a/src/modules/Image/encodings/any.c +++ b/src/modules/Image/encodings/any.c @@ -1,9 +1,9 @@ -/* $Id: any.c,v 1.17 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: any.c,v 1.18 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: any.c,v 1.17 2000/07/03 13:30:32 grubba Exp $ +**! $Id: any.c,v 1.18 2000/07/28 07:13:06 hubbe Exp $ **! submodule ANY **! **! This method calls the other decoding methods @@ -23,7 +23,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: any.c,v 1.17 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: any.c,v 1.18 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "operators.h" #include "builtin_functions.h" @@ -40,6 +40,9 @@ RCSID("$Id: any.c,v 1.17 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + /* **! method mapping _decode(string data) **! method object decode(string data) diff --git a/src/modules/Image/encodings/avs.c b/src/modules/Image/encodings/avs.c index 8154094aab776ebe255f2de5d1bbecbbc7b63676..07975f2a84fe73e9fe7623738c498a9dc89d4326 100644 --- a/src/modules/Image/encodings/avs.c +++ b/src/modules/Image/encodings/avs.c @@ -8,7 +8,7 @@ #endif #include "stralloc.h" -RCSID("$Id: avs.c,v 1.8 2000/02/03 19:01:29 grubba Exp $"); +RCSID("$Id: avs.c,v 1.9 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -17,12 +17,16 @@ RCSID("$Id: avs.c,v 1.8 2000/02/03 19:01:29 grubba Exp $"); #include "threads.h" #include "array.h" #include "error.h" - +#include "mapping.h" +#include "operators.h" #include "image.h" #include "builtin_functions.h" #include "module_support.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_program; /* @@ -46,7 +50,6 @@ extern struct program *image_program; void image_avs_f__decode(INT32 args) { - extern void f_aggregate_mapping(INT32 args); struct object *io, *ao; struct pike_string *s; unsigned int c; @@ -91,7 +94,6 @@ void image_avs_f__decode(INT32 args) void image_avs_f_decode(INT32 args) { - extern void f_index(INT32 args); image_avs_f__decode(args); push_constant_text("image"); f_index(2); diff --git a/src/modules/Image/encodings/bmp.c b/src/modules/Image/encodings/bmp.c index cf54daa064c70f360373dd2da10bf00f9a747cae..4ff2f022afec8781a23e23a0615797bc5970ae4f 100644 --- a/src/modules/Image/encodings/bmp.c +++ b/src/modules/Image/encodings/bmp.c @@ -1,9 +1,9 @@ -/* $Id: bmp.c,v 1.21 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: bmp.c,v 1.22 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: bmp.c,v 1.21 2000/07/03 13:30:32 grubba Exp $ +**! $Id: bmp.c,v 1.22 2000/07/28 07:13:06 hubbe Exp $ **! submodule BMP **! **! This submodule keeps the BMP (Windows Bitmap) @@ -22,7 +22,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: bmp.c,v 1.21 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: bmp.c,v 1.22 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -34,7 +34,6 @@ RCSID("$Id: bmp.c,v 1.21 2000/07/03 13:30:32 grubba Exp $"); #include "error.h" #include "operators.h" - #include "image.h" #include "colortable.h" @@ -42,7 +41,9 @@ RCSID("$Id: bmp.c,v 1.21 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" -extern void f_add(INT32 args); +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/gd.c b/src/modules/Image/encodings/gd.c index 929356ef71237061a3eb48068b0090b7758b1d38..f93c83c31cd5ad5dcb94375c29e26b55623d68c0 100644 --- a/src/modules/Image/encodings/gd.c +++ b/src/modules/Image/encodings/gd.c @@ -8,7 +8,7 @@ #endif #include "stralloc.h" -RCSID("$Id: gd.c,v 1.3 1999/05/30 20:12:08 mirar Exp $"); +RCSID("$Id: gd.c,v 1.4 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -24,6 +24,9 @@ RCSID("$Id: gd.c,v 1.3 1999/05/30 20:12:08 mirar Exp $"); #include "image.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_program; /* diff --git a/src/modules/Image/encodings/gif.c b/src/modules/Image/encodings/gif.c index f9da94420bda1d814a7d18aa02e8f37af72dad43..10d727563d0e2a78add330af3182413b8e4a4e7d 100644 --- a/src/modules/Image/encodings/gif.c +++ b/src/modules/Image/encodings/gif.c @@ -1,9 +1,9 @@ -/* $Id: gif.c,v 1.51 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: gif.c,v 1.52 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: gif.c,v 1.51 2000/07/03 13:30:32 grubba Exp $ +**! $Id: gif.c,v 1.52 2000/07/28 07:13:06 hubbe Exp $ **! submodule GIF **! **! This submodule keep the GIF encode/decode capabilities @@ -31,7 +31,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: gif.c,v 1.51 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: gif.c,v 1.52 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -45,18 +45,20 @@ RCSID("$Id: gif.c,v 1.51 2000/07/03 13:30:32 grubba Exp $"); #include "image.h" #include "colortable.h" #include "builtin_functions.h" +#include "operators.h" #include "mapping.h" #include "gif_lzw.h" #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; extern struct program *image_layer_program; -extern void f_add(INT32 args); - enum { GIF_ILLEGAL, diff --git a/src/modules/Image/encodings/gif_lzw.c b/src/modules/Image/encodings/gif_lzw.c index 4cd1b40023eef9e30bf909810b71755b52cad3ff..7f98ce82e8d21984b72c6412f86f61a6e83f9b4a 100644 --- a/src/modules/Image/encodings/gif_lzw.c +++ b/src/modules/Image/encodings/gif_lzw.c @@ -1,13 +1,16 @@ /* **! module Image **! note -**! $Id: gif_lzw.c,v 1.6 1999/05/30 20:11:14 mirar Exp $ +**! $Id: gif_lzw.c,v 1.7 2000/07/28 07:13:06 hubbe Exp $ */ #include "global.h" #include "image_machine.h" #include "gif_lzw.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + #define DEFAULT_OUTBYTES 16384 #define STDLZWCODES 8192 diff --git a/src/modules/Image/encodings/hrz.c b/src/modules/Image/encodings/hrz.c index 2651d9f69031c0f03a35d184cb773d7ea4c8344d..f836b84eebacd640d7a18eb89305f2dd44d1b12e 100644 --- a/src/modules/Image/encodings/hrz.c +++ b/src/modules/Image/encodings/hrz.c @@ -4,7 +4,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: hrz.c,v 1.4 1999/09/25 20:02:39 grubba Exp $"); +RCSID("$Id: hrz.c,v 1.5 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "mapping.h" @@ -21,6 +21,9 @@ RCSID("$Id: hrz.c,v 1.4 1999/09/25 20:02:39 grubba Exp $"); #include "builtin_functions.h" #include "module_support.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_program; /* diff --git a/src/modules/Image/encodings/iff.c b/src/modules/Image/encodings/iff.c index 209f0f5d823dfbc2e01b0b23467a70a267bdb965..e18a6675f2aea90d2fd8310f1010660eafc7653f 100644 --- a/src/modules/Image/encodings/iff.c +++ b/src/modules/Image/encodings/iff.c @@ -1,9 +1,9 @@ -/* $Id: iff.c,v 1.4 2000/02/03 19:01:29 grubba Exp $ */ +/* $Id: iff.c,v 1.5 2000/07/28 07:13:06 hubbe Exp $ */ #include "global.h" #include "stralloc.h" -RCSID("$Id: iff.c,v 1.4 2000/02/03 19:01:29 grubba Exp $"); +RCSID("$Id: iff.c,v 1.5 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -15,6 +15,8 @@ RCSID("$Id: iff.c,v 1.4 2000/02/03 19:01:29 grubba Exp $"); #include "operators.h" #include "builtin_functions.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" static INT32 low_parse_iff(unsigned char *data, INT32 len, unsigned char *hdr, struct mapping *m, unsigned char *stopchunk) diff --git a/src/modules/Image/encodings/ilbm.c b/src/modules/Image/encodings/ilbm.c index d52513fb0df4aabb816b248a74a4c3f7e316eaa3..dbd776c62250b74126b62a28887d07140accde0a 100644 --- a/src/modules/Image/encodings/ilbm.c +++ b/src/modules/Image/encodings/ilbm.c @@ -1,9 +1,9 @@ -/* $Id: ilbm.c,v 1.14 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: ilbm.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: ilbm.c,v 1.14 2000/07/03 13:30:32 grubba Exp $ +**! $Id: ilbm.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $ **! submodule ILBM **! **! This submodule keep the ILBM encode/decode capabilities @@ -14,7 +14,7 @@ #include "global.h" #include "stralloc.h" -RCSID("$Id: ilbm.c,v 1.14 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: ilbm.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -32,6 +32,9 @@ RCSID("$Id: ilbm.c,v 1.14 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/pcx.c b/src/modules/Image/encodings/pcx.c index a2f10af845d14eed1969078725fd0be58faf32e4..e78012278fc61dab9cd6768b35287a0ac776fa22 100644 --- a/src/modules/Image/encodings/pcx.c +++ b/src/modules/Image/encodings/pcx.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: pcx.c,v 1.9 2000/02/03 19:01:29 grubba Exp $"); +RCSID("$Id: pcx.c,v 1.10 2000/07/28 07:13:06 hubbe Exp $"); #include "image_machine.h" @@ -24,6 +24,9 @@ RCSID("$Id: pcx.c,v 1.9 2000/02/03 19:01:29 grubba Exp $"); #include "image.h" #include "colortable.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/png.c b/src/modules/Image/encodings/png.c index c2d234bff5475fdd6da93f12cf569ab80d5318be..a103cc5163e04d47972cbdfd9a90264bdb4cc5f0 100644 --- a/src/modules/Image/encodings/png.c +++ b/src/modules/Image/encodings/png.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: png.c,v 1.32 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: png.c,v 1.33 2000/07/28 07:13:06 hubbe Exp $"); #include "image_machine.h" @@ -20,6 +20,9 @@ RCSID("$Id: png.c,v 1.32 2000/07/03 13:30:32 grubba Exp $"); #include "image.h" #include "colortable.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c index 5633cea402b48060f77e23490bcde5b334c3c418..04c7080f969ec799e1ad89533f2e77386e1a0ac3 100644 --- a/src/modules/Image/encodings/pnm.c +++ b/src/modules/Image/encodings/pnm.c @@ -1,9 +1,9 @@ -/* $Id: pnm.c,v 1.21 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: pnm.c,v 1.22 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: pnm.c,v 1.21 2000/07/03 13:30:32 grubba Exp $ +**! $Id: pnm.c,v 1.22 2000/07/28 07:13:06 hubbe Exp $ **! submodule PNM **! **! This submodule keeps the PNM encode/decode capabilities @@ -49,7 +49,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: pnm.c,v 1.21 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: pnm.c,v 1.22 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -58,6 +58,7 @@ RCSID("$Id: pnm.c,v 1.21 2000/07/03 13:30:32 grubba Exp $"); #include "threads.h" #include "array.h" #include "error.h" +#include "operators.h" #include "image.h" @@ -65,6 +66,9 @@ RCSID("$Id: pnm.c,v 1.21 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; @@ -302,8 +306,6 @@ void img_pnm_encode_P1(INT32 args) /* ascii PBM */ free_string(b); } -extern void f_add(INT32 args); - void img_pnm_encode_P2(INT32 args) /* ascii PGM */ { char buf[80]; diff --git a/src/modules/Image/encodings/psd.c b/src/modules/Image/encodings/psd.c index 397e3c2e787d79fa6bd2f6053bb17655c9d5bb5a..269d6d0c88bad919a04e3c7505817e35671da127 100644 --- a/src/modules/Image/encodings/psd.c +++ b/src/modules/Image/encodings/psd.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: psd.c,v 1.16 2000/07/07 16:24:08 grubba Exp $"); +RCSID("$Id: psd.c,v 1.17 2000/07/28 07:13:06 hubbe Exp $"); #include "image_machine.h" @@ -25,6 +25,8 @@ RCSID("$Id: psd.c,v 1.16 2000/07/07 16:24:08 grubba Exp $"); #include "image.h" #include "colortable.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" /* The sp macro conflicts with Solaris 2.5.1's <netinet/in.h>. */ @@ -75,7 +77,7 @@ static unsigned int read_uint( struct buffer *from ) return res; } -static int read_int( struct buffer *from ) +static int psd_read_int( struct buffer *from ) { return (int)read_uint( from ); } @@ -128,7 +130,7 @@ static char *read_data( struct buffer * from, unsigned int len ) static struct buffer read_string( struct buffer *data ) { struct buffer res; - res.len = read_int( data ); + res.len = psd_read_int( data ); res.str = (unsigned char *)read_data( data, res.len ); if(res.len > 0) res.len--; /* len includes ending \0 */ if(!res.str) @@ -210,7 +212,7 @@ static void decode_layers_and_masks( struct psd_image *dst, if(!src->len) return; - exp_offset = src->len-read_int( src ); /* size of layer region */ + exp_offset = src->len-psd_read_int( src ); /* size of layer region */ count = read_short( src ); if( count < 0 ) @@ -228,10 +230,10 @@ static void decode_layers_and_masks( struct psd_image *dst, layer->next = dst->first_layer; if(dst->first_layer) dst->first_layer->prev = layer; dst->first_layer = layer; - layer->top = read_int( src ); - layer->left = read_int( src ); - layer->bottom = read_int( src ); - layer->right = read_int( src ); + layer->top = psd_read_int( src ); + layer->left = psd_read_int( src ); + layer->bottom = psd_read_int( src ); + layer->right = psd_read_int( src ); layer->num_channels = read_short( src ); for(cnt=0; cnt<layer->num_channels; cnt++) { @@ -253,10 +255,10 @@ static void decode_layers_and_masks( struct psd_image *dst, tmp2 = read_string( &tmp ); if( tmp2.len ) { - layer->mask_top = read_int( &tmp2 ); - layer->mask_left = read_int( &tmp2 ); - layer->mask_bottom = read_int( &tmp2 ); - layer->mask_right = read_int( &tmp2 ); + layer->mask_top = psd_read_int( &tmp2 ); + layer->mask_left = psd_read_int( &tmp2 ); + layer->mask_bottom = psd_read_int( &tmp2 ); + layer->mask_right = psd_read_int( &tmp2 ); layer->mask_default_color = read_uchar( &tmp2 ); layer->mask_flags = read_uchar( &tmp2 ); } diff --git a/src/modules/Image/encodings/pvr.c b/src/modules/Image/encodings/pvr.c index 0d20d93348d54837c591fdc8434b80ef40d6c0e2..7fe830f87b4c3943bbc39e57b43f87df06222dca 100644 --- a/src/modules/Image/encodings/pvr.c +++ b/src/modules/Image/encodings/pvr.c @@ -4,7 +4,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: pvr.c,v 1.8 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: pvr.c,v 1.9 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -24,6 +24,9 @@ RCSID("$Id: pvr.c,v 1.8 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_program; /* diff --git a/src/modules/Image/encodings/ras.c b/src/modules/Image/encodings/ras.c index 6a34e78876ff3e3a97ce6d8125393a42656d4533..f42997b66ed392156f5000fd4b7955259114a885 100644 --- a/src/modules/Image/encodings/ras.c +++ b/src/modules/Image/encodings/ras.c @@ -1,9 +1,9 @@ -/* $Id: ras.c,v 1.6 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: ras.c,v 1.7 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: ras.c,v 1.6 2000/07/03 13:30:32 grubba Exp $ +**! $Id: ras.c,v 1.7 2000/07/28 07:13:06 hubbe Exp $ **! submodule RAS **! **! This submodule keep the RAS encode/decode capabilities @@ -14,7 +14,7 @@ #include "global.h" #include "stralloc.h" -RCSID("$Id: ras.c,v 1.6 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: ras.c,v 1.7 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -34,6 +34,9 @@ RCSID("$Id: ras.c,v 1.6 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/tga.c b/src/modules/Image/encodings/tga.c index 4d83c541b17da513a2e49033b99a033a2befa75d..984d7ea0c5556425d1f8a9b81a7a972fe80c5f61 100644 --- a/src/modules/Image/encodings/tga.c +++ b/src/modules/Image/encodings/tga.c @@ -1,6 +1,6 @@ /* - * $Id: tga.c,v 1.15 2000/07/07 00:41:46 hubbe Exp $ + * $Id: tga.c,v 1.16 2000/07/28 07:13:06 hubbe Exp $ * * Targa codec for pike. Based on the tga plugin for gimp. * @@ -77,7 +77,11 @@ #include "image.h" #include "colortable.h" -RCSID("$Id: tga.c,v 1.15 2000/07/07 00:41:46 hubbe Exp $"); +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + +RCSID("$Id: tga.c,v 1.16 2000/07/28 07:13:06 hubbe Exp $"); #ifndef MIN # define MIN(X,Y) ((X)<(Y)?(X):(Y)) diff --git a/src/modules/Image/encodings/tim.c b/src/modules/Image/encodings/tim.c index c81798496fcc8ccef844968657123e790977e15c..067427a47f8b347a3f862a40f420e521d5a6caa0 100644 --- a/src/modules/Image/encodings/tim.c +++ b/src/modules/Image/encodings/tim.c @@ -4,7 +4,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: tim.c,v 1.6 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: tim.c,v 1.7 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -24,6 +24,10 @@ RCSID("$Id: tim.c,v 1.6 2000/07/03 13:30:32 grubba Exp $"); #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + extern struct program *image_program; /* diff --git a/src/modules/Image/encodings/wbf.c b/src/modules/Image/encodings/wbf.c index dc92bca0f132b50d859751a8fdd73d884ef2e183..db55a183c0bbada0a9a8e6fdd7509e333341ef91 100644 --- a/src/modules/Image/encodings/wbf.c +++ b/src/modules/Image/encodings/wbf.c @@ -5,7 +5,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: wbf.c,v 1.4 2000/02/03 19:01:29 grubba Exp $"); +RCSID("$Id: wbf.c,v 1.5 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "mapping.h" @@ -24,6 +24,10 @@ RCSID("$Id: wbf.c,v 1.4 2000/02/03 19:01:29 grubba Exp $"); #include "builtin_functions.h" #include "module_support.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + extern struct program *image_program; /* @@ -80,7 +84,7 @@ static unsigned char read_uchar( struct buffer *from ) return res; } -static int read_int( struct buffer *from ) +static int wbf_read_int( struct buffer *from ) { int res = 0; while( 1 ) @@ -107,14 +111,14 @@ static struct wbf_header decode_header( struct buffer *data ) { struct wbf_header res; MEMSET( &res, 0, sizeof(res) ); - res.type = read_int( data ); + res.type = wbf_read_int( data ); res.fix_header_field = read_uchar( data ); if( res.fix_header_field & 0x80 ) { switch( (res.fix_header_field>>5) & 0x3 ) { case 0: /* Single varint extra header */ - res.ext_header_field = read_int( data ); + res.ext_header_field = wbf_read_int( data ); break; case 1: /* reserved */ case 2: /* reserved */ @@ -138,8 +142,8 @@ static struct wbf_header decode_header( struct buffer *data ) } } } - res.width = read_int( data ); - res.height = read_int( data ); + res.width = wbf_read_int( data ); + res.height = wbf_read_int( data ); return res; } diff --git a/src/modules/Image/encodings/x.c b/src/modules/Image/encodings/x.c index b8ef6e068d13463acbfe15170ff075d1a8144821..f4d305e2778883df6e602fc83b725a26465898e2 100644 --- a/src/modules/Image/encodings/x.c +++ b/src/modules/Image/encodings/x.c @@ -1,9 +1,9 @@ -/* $Id: x.c,v 1.26 2000/03/27 07:42:35 hubbe Exp $ */ +/* $Id: x.c,v 1.27 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: x.c,v 1.26 2000/03/27 07:42:35 hubbe Exp $ +**! $Id: x.c,v 1.27 2000/07/28 07:13:06 hubbe Exp $ **! submodule X **! **! This submodule handles encoding and decoding of @@ -29,7 +29,7 @@ #include <winsock.h> #endif -RCSID("$Id: x.c,v 1.26 2000/03/27 07:42:35 hubbe Exp $"); +RCSID("$Id: x.c,v 1.27 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -46,6 +46,10 @@ RCSID("$Id: x.c,v 1.26 2000/03/27 07:42:35 hubbe Exp $"); #include "colortable.h" #include "builtin_functions.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/xbm.c b/src/modules/Image/encodings/xbm.c index 0c71940a0d394a6a121443bd8282d5d0b4a674bc..41c228fe783cbebf25a2fcbd6a57618be50b84e1 100644 --- a/src/modules/Image/encodings/xbm.c +++ b/src/modules/Image/encodings/xbm.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: xbm.c,v 1.9 2000/07/07 00:42:24 hubbe Exp $"); +RCSID("$Id: xbm.c,v 1.10 2000/07/28 07:13:06 hubbe Exp $"); #define NO_PIKE_SHORTHAND @@ -39,6 +39,10 @@ RCSID("$Id: xbm.c,v 1.9 2000/07/07 00:42:24 hubbe Exp $"); #include "image.h" #include "colortable.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + extern struct program *image_colortable_program; extern struct program *image_program; diff --git a/src/modules/Image/encodings/xcf.c b/src/modules/Image/encodings/xcf.c index 441885bec0c49d8676c90cd0ef888fae38eef15c..a1d337a1933bbc8706285f7412463521cff069f5 100644 --- a/src/modules/Image/encodings/xcf.c +++ b/src/modules/Image/encodings/xcf.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: xcf.c,v 1.14 2000/04/10 21:58:23 grubba Exp $"); +RCSID("$Id: xcf.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $"); #include "image_machine.h" @@ -20,10 +20,15 @@ RCSID("$Id: xcf.c,v 1.14 2000/04/10 21:58:23 grubba Exp $"); #include "builtin_functions.h" #include "operators.h" #include "dynamic_buffer.h" +#include "signal_handler.h" #include "image.h" #include "colortable.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + extern struct program *image_colortable_program; extern struct program *image_program; @@ -154,7 +159,7 @@ static unsigned int read_uint( struct buffer *from ) return res; } -static int read_int( struct buffer *from ) +static int xcf_read_int( struct buffer *from ) { return (int)read_uint( from ); } @@ -173,7 +178,7 @@ static char *read_data( struct buffer * from, unsigned int len ) static struct buffer read_string( struct buffer *data ) { struct buffer res; - res.len = read_int( data ); + res.len = xcf_read_int( data ); res.str = (unsigned char *)read_data( data, res.len ); if(res.len > 0) res.len--; /* len includes ending \0 */ if(!res.str) @@ -497,7 +502,7 @@ static struct layer read_layer( struct buffer *buff, struct buffer *initial ) SET_ONERROR( err, free_layer, &res ); res.width = read_uint( buff ); res.height = read_uint( buff ); - res.type = read_int( buff ); + res.type = xcf_read_int( buff ); res.name = read_string( buff ); @@ -513,8 +518,8 @@ static struct layer read_layer( struct buffer *buff, struct buffer *initial ) } } while( tmp.type ); - h_offset = read_int( buff ); - lm_offset = read_int( buff ); + h_offset = xcf_read_int( buff ); + lm_offset = xcf_read_int( buff ); if(lm_offset) { @@ -565,7 +570,7 @@ static struct gimp_image read_image( struct buffer * data ) res.width = read_uint( data ); res.height = read_uint( data ); - res.type = read_int( data ); + res.type = xcf_read_int( data ); SET_ONERROR( err, free_image, &res ); @@ -1088,7 +1093,6 @@ void image_xcf_f__rle_decode( INT32 args ) void image_xcf_f__decode_tiles( INT32 args ) { - extern void check_signals(); struct object *io,*ao, *cmapo; struct array *tiles; struct image *i, *a=NULL; @@ -1164,7 +1168,7 @@ void image_xcf_f__decode_tiles( INT32 args ) s = (unsigned char *)tile->str; - check_signals(); /* Allow ^C */ + check_signals(0,0,0); /* Allow ^C */ for(cy=0; cy<eheight; cy++) { diff --git a/src/modules/Image/encodings/xwd.c b/src/modules/Image/encodings/xwd.c index 9363fdf29620361fcb7dab379ac383c269cafe41..140fbe924efb76cc43bf9edd8043bb1b3ca56ae9 100644 --- a/src/modules/Image/encodings/xwd.c +++ b/src/modules/Image/encodings/xwd.c @@ -1,9 +1,9 @@ -/* $Id: xwd.c,v 1.14 2000/07/03 13:30:32 grubba Exp $ */ +/* $Id: xwd.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $ */ /* **! module Image **! note -**! $Id: xwd.c,v 1.14 2000/07/03 13:30:32 grubba Exp $ +**! $Id: xwd.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $ **! submodule XWD **! **! This submodule keeps the XWD (X Windows Dump) @@ -25,7 +25,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: xwd.c,v 1.14 2000/07/03 13:30:32 grubba Exp $"); +RCSID("$Id: xwd.c,v 1.15 2000/07/28 07:13:06 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -38,16 +38,18 @@ RCSID("$Id: xwd.c,v 1.14 2000/07/03 13:30:32 grubba Exp $"); #include "image.h" #include "builtin_functions.h" - +#include "operators.h" #include "encodings.h" +/* MUST BE INCLUDED LAST */ +#include "module_magic.h" + + extern struct program *image_colortable_program; extern struct program *image_program; void image_x_decode_truecolor_masks(INT32 args); void image_x_decode_pseudocolor(INT32 args); -void f_aggregate_mapping(INT32 args); -void f_index(INT32 args); /* **! method mapping _decode(string data) diff --git a/src/modules/Image/font.c b/src/modules/Image/font.c index ab548ba4ad6ea03d5196aed198270e8384bea186..06dd08fe2a3e18ac13ae9a708c0d00107ac0e99c 100644 --- a/src/modules/Image/font.c +++ b/src/modules/Image/font.c @@ -1,4 +1,4 @@ -/* $Id: font.c,v 1.59 2000/07/07 13:56:45 grubba Exp $ */ +/* $Id: font.c,v 1.60 2000/07/28 07:12:44 hubbe Exp $ */ #include "global.h" #define SPACE_CHAR 'i' @@ -9,7 +9,7 @@ extern unsigned char * image_default_font; /* **! module Image **! note -**! $Id: font.c,v 1.59 2000/07/07 13:56:45 grubba Exp $ +**! $Id: font.c,v 1.60 2000/07/28 07:12:44 hubbe Exp $ **! class Font **! **! note @@ -185,6 +185,9 @@ Kerningtable types: #include "fdlib.h" +/* This must be included last! */ +#include "module_magic.h" + extern struct program *font_program; extern struct program *image_program; diff --git a/src/modules/Image/image.c b/src/modules/Image/image.c index fbc073926a1abd157d324ea8ae050c6c05634713..a2c31735acc6987d20d5ffe831fad3b01da742c6 100644 --- a/src/modules/Image/image.c +++ b/src/modules/Image/image.c @@ -1,9 +1,9 @@ -/* $Id: image.c,v 1.165 2000/07/27 03:45:48 per Exp $ */ +/* $Id: image.c,v 1.166 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: image.c,v 1.165 2000/07/27 03:45:48 per Exp $ +**! $Id: image.c,v 1.166 2000/07/28 07:12:44 hubbe Exp $ **! class Image **! **! The main object of the <ref>Image</ref> module, this object @@ -98,7 +98,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: image.c,v 1.165 2000/07/27 03:45:48 per Exp $"); +RCSID("$Id: image.c,v 1.166 2000/07/28 07:12:44 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -119,6 +119,10 @@ RCSID("$Id: image.c,v 1.165 2000/07/27 03:45:48 per Exp $"); #include "assembly.h" #endif +/* This must be included last! */ +#include "module_magic.h" + + extern struct program *image_program; extern struct program *image_colortable_program; diff --git a/src/modules/Image/image_module.c b/src/modules/Image/image_module.c index 7fe7eb95ebac2aa6a4599e1b85646f9fec90fcec..b11265f8e3e690c6a857ceb4dd3ef4b5b0158952 100644 --- a/src/modules/Image/image_module.c +++ b/src/modules/Image/image_module.c @@ -1,7 +1,7 @@ #include "global.h" #include "stralloc.h" #include "global.h" -RCSID("$Id: image_module.c,v 1.6 2000/06/02 05:03:13 per Exp $"); +RCSID("$Id: image_module.c,v 1.7 2000/07/28 07:12:44 hubbe Exp $"); #include "pike_macros.h" #include "interpret.h" #include "program.h" @@ -12,6 +12,10 @@ RCSID("$Id: image_module.c,v 1.6 2000/06/02 05:03:13 per Exp $"); #include "assembly.h" #include "image_machine.h" +/* This must be included last! */ +#include "module_magic.h" + + #define IMAGE_INITER /* #define DEBUG */ diff --git a/src/modules/Image/layers.c b/src/modules/Image/layers.c index 69e55b00d97a87261fc5515a742eea80bbd841f3..789f15673d61d81888c7d8e2ee7a75a1d9fe7e55 100644 --- a/src/modules/Image/layers.c +++ b/src/modules/Image/layers.c @@ -1,7 +1,7 @@ /* **! module Image **! note -**! $Id: layers.c,v 1.44 2000/07/07 00:40:19 hubbe Exp $ +**! $Id: layers.c,v 1.45 2000/07/28 07:12:44 hubbe Exp $ **! class Layer **! see also: layers **! @@ -215,7 +215,7 @@ #include <math.h> /* floor */ -RCSID("$Id: layers.c,v 1.44 2000/07/07 00:40:19 hubbe Exp $"); +RCSID("$Id: layers.c,v 1.45 2000/07/28 07:12:44 hubbe Exp $"); #include "image_machine.h" @@ -236,6 +236,8 @@ RCSID("$Id: layers.c,v 1.44 2000/07/07 00:40:19 hubbe Exp $"); #include "image.h" +/* This must be included last! */ +#include "module_magic.h" #ifdef TRY_USE_MMX #include <mmx.h> diff --git a/src/modules/Image/matrix.c b/src/modules/Image/matrix.c index 4c77a16eef5e570e656a079e20d2c9f2c8fa46f2..d7ab25b21c8cd94db2b7addc378515dcd0293caf 100644 --- a/src/modules/Image/matrix.c +++ b/src/modules/Image/matrix.c @@ -1,9 +1,9 @@ -/* $Id: matrix.c,v 1.23 2000/07/07 13:56:46 grubba Exp $ */ +/* $Id: matrix.c,v 1.24 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: matrix.c,v 1.23 2000/07/07 13:56:46 grubba Exp $ +**! $Id: matrix.c,v 1.24 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ @@ -25,6 +25,9 @@ #include "image.h" +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS /* Needed for NT */ diff --git a/src/modules/Image/operator.c b/src/modules/Image/operator.c index db21c8e6b03d1712140fcbc03f187b3446743c86..f1a1cdd6a6f311d1faa38048db5fe9f744ad2f8e 100644 --- a/src/modules/Image/operator.c +++ b/src/modules/Image/operator.c @@ -1,9 +1,9 @@ -/* $Id: operator.c,v 1.29 2000/07/07 13:56:46 grubba Exp $ */ +/* $Id: operator.c,v 1.30 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: operator.c,v 1.29 2000/07/07 13:56:46 grubba Exp $ +**! $Id: operator.c,v 1.30 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ @@ -28,6 +28,9 @@ #include "image_machine.h" #include "assembly.h" +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS diff --git a/src/modules/Image/orient.c b/src/modules/Image/orient.c index 185f9dded3e5e70b8b63d4057ffd72fa4525d0fe..77c9680d9a3906e7f00c3bfe0d633374db1b58e8 100644 --- a/src/modules/Image/orient.c +++ b/src/modules/Image/orient.c @@ -1,9 +1,9 @@ -/* $Id: orient.c,v 1.14 2000/07/07 13:56:46 grubba Exp $ */ +/* $Id: orient.c,v 1.15 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: orient.c,v 1.14 2000/07/07 13:56:46 grubba Exp $ +**! $Id: orient.c,v 1.15 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ @@ -27,6 +27,9 @@ #include <builtin_functions.h> +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS /* Needed for NT */ diff --git a/src/modules/Image/pattern.c b/src/modules/Image/pattern.c index e6812dfc924df28f190f13902c4bc08ba5561b4e..b38f11bd9ab405c5c6a2a82268206cfa869f92a4 100644 --- a/src/modules/Image/pattern.c +++ b/src/modules/Image/pattern.c @@ -1,9 +1,9 @@ -/* $Id: pattern.c,v 1.19 2000/07/07 13:56:46 grubba Exp $ */ +/* $Id: pattern.c,v 1.20 2000/07/28 07:12:44 hubbe Exp $ */ /* **! module Image **! note -**! $Id: pattern.c,v 1.19 2000/07/07 13:56:46 grubba Exp $ +**! $Id: pattern.c,v 1.20 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ @@ -26,6 +26,9 @@ #include "image.h" +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS diff --git a/src/modules/Image/poly.c b/src/modules/Image/poly.c index 054ba1b1c8bd25217bbc1a97271b67e6984d4c6f..8c5e2aa51e3cca4b7c4fa421395450b93d051d93 100644 --- a/src/modules/Image/poly.c +++ b/src/modules/Image/poly.c @@ -1,7 +1,7 @@ /* **! module Image **! note -**! $Id: poly.c,v 1.4 2000/07/07 13:56:46 grubba Exp $ +**! $Id: poly.c,v 1.5 2000/07/28 07:12:44 hubbe Exp $ **! class Poly **! */ @@ -18,7 +18,7 @@ another? #include "global.h" -RCSID("$Id: poly.c,v 1.4 2000/07/07 13:56:46 grubba Exp $"); +RCSID("$Id: poly.c,v 1.5 2000/07/28 07:12:44 hubbe Exp $"); #include "image_machine.h" @@ -44,6 +44,9 @@ RCSID("$Id: poly.c,v 1.4 2000/07/07 13:56:46 grubba Exp $"); #include "colortable.h" #include "initstuff.h" +/* This must be included last! */ +#include "module_magic.h" + #ifdef PFLOAT #undef PFLOAT #endif diff --git a/src/modules/Image/polyfill.c b/src/modules/Image/polyfill.c index 259b05badf83b196d6cc966247fcd0fe7629dde1..9f0366b5a9eecf8823437db7404360037a647ecd 100644 --- a/src/modules/Image/polyfill.c +++ b/src/modules/Image/polyfill.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: polyfill.c,v 1.31 2000/07/07 13:56:46 grubba Exp $"); +RCSID("$Id: polyfill.c,v 1.32 2000/07/28 07:12:44 hubbe Exp $"); /* Prototypes are needed for these */ extern double floor(double); @@ -26,6 +26,9 @@ extern double floor(double); #include "image.h" +/* This must be included last! */ +#include "module_magic.h" + #ifdef THIS #undef THIS #endif @@ -37,7 +40,7 @@ extern double floor(double); /* **! module Image **! note -**! $Id: polyfill.c,v 1.31 2000/07/07 13:56:46 grubba Exp $ +**! $Id: polyfill.c,v 1.32 2000/07/28 07:12:44 hubbe Exp $ **! class Image */ diff --git a/src/modules/Image/search.c b/src/modules/Image/search.c index 023d79eb37659ad3705f1cc0ca33c5b1e2d67b4c..fb34bc7b94116a0e9c75d11949fcc13ccf00b045 100644 --- a/src/modules/Image/search.c +++ b/src/modules/Image/search.c @@ -26,6 +26,9 @@ #include <builtin_functions.h> +/* This must be included last! */ +#include "module_magic.h" + extern struct program *image_program; #ifdef THIS #undef THIS /* Needed for NT */ diff --git a/src/modules/Java/jvm.c b/src/modules/Java/jvm.c index 069ec0aab70f71116456ca2bf954f152d871ad14..14c3895c9b93a04f93980fe0d79f65cb28292518 100644 --- a/src/modules/Java/jvm.c +++ b/src/modules/Java/jvm.c @@ -1,5 +1,5 @@ /* - * $Id: jvm.c,v 1.25 2000/07/08 01:10:36 marcus Exp $ + * $Id: jvm.c,v 1.26 2000/07/28 07:13:18 hubbe Exp $ * * Pike interface to Java Virtual Machine * @@ -17,7 +17,7 @@ #endif /* HAVE_CONFIG_H */ #include "global.h" -RCSID("$Id: jvm.c,v 1.25 2000/07/08 01:10:36 marcus Exp $"); +RCSID("$Id: jvm.c,v 1.26 2000/07/28 07:13:18 hubbe Exp $"); #include "program.h" #include "interpret.h" #include "stralloc.h" @@ -3159,6 +3159,8 @@ static void f_new_double_array(INT32 args) push_int(0); } +#else +#include "module_magic.h" #endif /* HAVE_JAVA */ void pike_module_init(void) diff --git a/src/modules/MIME/mime.c b/src/modules/MIME/mime.c index 96618ef442874d1c3728d64ffb4bc49f1d8ba49a..4f7856d6555f9126215121ca3f8e9dbb2dbff1ba 100644 --- a/src/modules/MIME/mime.c +++ b/src/modules/MIME/mime.c @@ -1,5 +1,5 @@ /* - * $Id: mime.c,v 1.21 1999/08/17 18:38:32 marcus Exp $ + * $Id: mime.c,v 1.22 2000/07/28 07:13:26 hubbe Exp $ * * RFC1521 functionality for Pike * @@ -10,7 +10,7 @@ #include "config.h" -RCSID("$Id: mime.c,v 1.21 1999/08/17 18:38:32 marcus Exp $"); +RCSID("$Id: mime.c,v 1.22 2000/07/28 07:13:26 hubbe Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" @@ -25,6 +25,8 @@ RCSID("$Id: mime.c,v 1.21 1999/08/17 18:38:32 marcus Exp $"); #define SIGNED #endif +/* must be included last */ +#include "module_magic.h" /** Forward declarations of functions implementing Pike functions **/ diff --git a/src/modules/Math/math_matrix.c b/src/modules/Math/math_matrix.c index 51a8545a8dfefffd20ec01c32597ccea0a887ea8..06df59034b24520a953dbe24750245635e6e9342 100644 --- a/src/modules/Math/math_matrix.c +++ b/src/modules/Math/math_matrix.c @@ -1,4 +1,4 @@ -/* $Id: math_matrix.c,v 1.13 2000/07/07 14:01:16 grubba Exp $ */ +/* $Id: math_matrix.c,v 1.14 2000/07/28 07:13:32 hubbe Exp $ */ #include "global.h" #include "config.h" @@ -20,6 +20,9 @@ #include "math_module.h" +/* must be included last */ +#include "module_magic.h" + /* **! module Math **! class Matrix diff --git a/src/modules/Math/math_module.c b/src/modules/Math/math_module.c index 6576a0b1459d669b1e7de02fbd8b82dff17d276d..a0a8447223cc3d423fe29ba98a4e242f19b2571b 100644 --- a/src/modules/Math/math_module.c +++ b/src/modules/Math/math_module.c @@ -1,5 +1,5 @@ /* - * $Id: math_module.c,v 1.4 1999/11/08 22:40:16 grubba Exp $ + * $Id: math_module.c,v 1.5 2000/07/28 07:13:32 hubbe Exp $ */ #include "global.h" @@ -9,6 +9,9 @@ #include "math_module.h" +/* must be included last */ +#include "module_magic.h" + /*** module init & exit & stuff *****************************************/ /* add other parsers here */ diff --git a/src/modules/Mird/mird_glue.c b/src/modules/Mird/mird_glue.c index e0e5b807662098f6d4718a136f6521996254c9e0..acff2066679b6e54131469722fcc1eb15fa2bdc3 100644 --- a/src/modules/Mird/mird_glue.c +++ b/src/modules/Mird/mird_glue.c @@ -18,6 +18,8 @@ #endif #endif +#include "module_magic.h" + #ifdef HAVE_MIRD #include "mird.h" diff --git a/src/modules/Msql/msqlmod.c b/src/modules/Msql/msqlmod.c index 56f90e57b16a190d8408fd249cb81b58b76f9fa9..985e31216fcfffa30c36c0b1234d565f40c85845 100644 --- a/src/modules/Msql/msqlmod.c +++ b/src/modules/Msql/msqlmod.c @@ -2,7 +2,7 @@ * This code is (C) Francesco Chemolli, 1997. * You may use, modify and redistribute it freely under the terms * of the GNU General Public License, version 2. - * $Id: msqlmod.c,v 1.13 2000/04/30 21:15:24 kinkie Exp $ + * $Id: msqlmod.c,v 1.14 2000/07/28 07:13:45 hubbe Exp $ * * This version is intended for Pike/0.5 and later. * It won't compile under older versions of the Pike interpreter. @@ -35,7 +35,7 @@ #include "operators.h" #include "multiset.h" -RCSID("$Id: msqlmod.c,v 1.13 2000/04/30 21:15:24 kinkie Exp $"); +RCSID("$Id: msqlmod.c,v 1.14 2000/07/28 07:13:45 hubbe Exp $"); #include "version.h" #ifdef _REENTRANT @@ -806,6 +806,7 @@ void pike_module_init(void) } #else /*HAVE_MSQL*/ +#include "module_magic.h" void pike_module_init(void) {} #endif /*HAVE_MSQL*/ diff --git a/src/modules/Mysql/mysql.c b/src/modules/Mysql/mysql.c index 86e9bc892a99e2bbfd5b14695e378227ed8c2af4..7c6b324690123acf36a0d29b93051ecc36d639d9 100644 --- a/src/modules/Mysql/mysql.c +++ b/src/modules/Mysql/mysql.c @@ -1,5 +1,5 @@ /* - * $Id: mysql.c,v 1.34 2000/07/07 16:05:46 marcus Exp $ + * $Id: mysql.c,v 1.35 2000/07/28 07:13:51 hubbe Exp $ * * SQL database functionality for Pike * @@ -80,6 +80,8 @@ typedef struct dynamic_buffer_s dynamic_buffer; #include <memory.h> #endif +#include "module_magic.h" + #ifdef HAVE_MYSQL /* Local includes */ @@ -89,7 +91,7 @@ typedef struct dynamic_buffer_s dynamic_buffer; * Globals */ -RCSID("$Id: mysql.c,v 1.34 2000/07/07 16:05:46 marcus Exp $"); +RCSID("$Id: mysql.c,v 1.35 2000/07/28 07:13:51 hubbe Exp $"); /* **! module Mysql @@ -101,7 +103,7 @@ RCSID("$Id: mysql.c,v 1.34 2000/07/07 16:05:46 marcus Exp $"); **! see also: Mysql.mysql, Mysql.result, Sql.sql **! **! note -**! $Id: mysql.c,v 1.34 2000/07/07 16:05:46 marcus Exp $ +**! $Id: mysql.c,v 1.35 2000/07/28 07:13:51 hubbe Exp $ **! **! class mysql **! diff --git a/src/modules/Odbc/odbc.c b/src/modules/Odbc/odbc.c index 331ba86936c0fdd9af60cd1e8cba2a41f9838901..c93a89a6f152cf02ac5967c78d2bd0e328c73570 100644 --- a/src/modules/Odbc/odbc.c +++ b/src/modules/Odbc/odbc.c @@ -1,5 +1,5 @@ /* - * $Id: odbc.c,v 1.18 1999/05/18 02:06:09 grubba Exp $ + * $Id: odbc.c,v 1.19 2000/07/28 07:13:58 hubbe Exp $ * * Pike interface to ODBC compliant databases. * @@ -16,7 +16,7 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ -RCSID("$Id: odbc.c,v 1.18 1999/05/18 02:06:09 grubba Exp $"); +RCSID("$Id: odbc.c,v 1.19 2000/07/28 07:13:58 hubbe Exp $"); #include "interpret.h" #include "object.h" @@ -31,6 +31,9 @@ RCSID("$Id: odbc.c,v 1.18 1999/05/18 02:06:09 grubba Exp $"); #include "precompiled_odbc.h" +/* must be included last */ +#include "module_magic.h" + #ifdef HAVE_ODBC /* diff --git a/src/modules/Odbc/odbc_result.c b/src/modules/Odbc/odbc_result.c index d16dab671eb2d321982dd950220e859da7f4e80c..f1f7fc793a5b4c2d6af80bc913977a56f3f2882f 100644 --- a/src/modules/Odbc/odbc_result.c +++ b/src/modules/Odbc/odbc_result.c @@ -1,5 +1,5 @@ /* - * $Id: odbc_result.c,v 1.18 1999/03/28 17:50:03 marcus Exp $ + * $Id: odbc_result.c,v 1.19 2000/07/28 07:13:58 hubbe Exp $ * * Pike interface to ODBC compliant databases * @@ -16,7 +16,7 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ -RCSID("$Id: odbc_result.c,v 1.18 1999/03/28 17:50:03 marcus Exp $"); +RCSID("$Id: odbc_result.c,v 1.19 2000/07/28 07:13:58 hubbe Exp $"); #include "interpret.h" #include "object.h" @@ -35,6 +35,9 @@ RCSID("$Id: odbc_result.c,v 1.18 1999/03/28 17:50:03 marcus Exp $"); #include "precompiled_odbc.h" +/* must be included last */ +#include "module_magic.h" + #ifdef HAVE_ODBC /* #define ODBC_DEBUG */ diff --git a/src/modules/Oracle/oracle.c b/src/modules/Oracle/oracle.c index 96bc4eac7272ec7a2f31ea9478cacc8da29875f1..ad3632219f352823a2ba22e5750e48f7bfb19ea6 100644 --- a/src/modules/Oracle/oracle.c +++ b/src/modules/Oracle/oracle.c @@ -1,5 +1,5 @@ /* - * $Id: oracle.c,v 1.43 2000/07/07 00:50:10 hubbe Exp $ + * $Id: oracle.c,v 1.44 2000/07/28 07:14:04 hubbe Exp $ * * Pike interface to Oracle databases. * @@ -33,6 +33,9 @@ #include "opcodes.h" #include "pike_macros.h" +/* must be included last */ +#include "module_magic.h" + #ifdef HAVE_ORACLE /* VERY VERY UGLY */ @@ -41,7 +44,7 @@ #include <oci.h> #include <math.h> -RCSID("$Id: oracle.c,v 1.43 2000/07/07 00:50:10 hubbe Exp $"); +RCSID("$Id: oracle.c,v 1.44 2000/07/28 07:14:04 hubbe Exp $"); #define BLOB_FETCH_CHUNK 16384 diff --git a/src/modules/Parser/html.c b/src/modules/Parser/html.c index 046b203b81b3ea9af7b31794b7776fdb75cf219e..a8abcfcf02447013cf9aecdb320077c6f1e90753 100644 --- a/src/modules/Parser/html.c +++ b/src/modules/Parser/html.c @@ -19,6 +19,9 @@ #include "parser.h" +/* must be included last */ +#include "module_magic.h" + extern struct program *parser_html_program; /* diff --git a/src/modules/Parser/parser.c b/src/modules/Parser/parser.c index cb012a3e3cb6b54f3ccd609aa2702d05b2baa68a..0b3fc1209205f8b8bda6c6846ba01bad10b262cf 100644 --- a/src/modules/Parser/parser.c +++ b/src/modules/Parser/parser.c @@ -1,7 +1,7 @@ #include "global.h" #include "stralloc.h" #include "global.h" -RCSID("$Id: parser.c,v 1.7 2000/06/24 00:48:31 hubbe Exp $"); +RCSID("$Id: parser.c,v 1.8 2000/07/28 07:14:14 hubbe Exp $"); #include "pike_macros.h" #include "interpret.h" #include "program.h" @@ -11,6 +11,9 @@ RCSID("$Id: parser.c,v 1.7 2000/06/24 00:48:31 hubbe Exp $"); #include "parser.h" +/* must be included last */ +#include "module_magic.h" + #define PARSER_INITER /*#define DEBUG*/ diff --git a/src/modules/Perl/perlmod.c b/src/modules/Perl/perlmod.c index b4043b427229f92b004f43cb6c78e1c9f8f6cf4e..f23ae0c7cd522fefb6b414938fbfe1c1765609bd 100644 --- a/src/modules/Perl/perlmod.c +++ b/src/modules/Perl/perlmod.c @@ -1,4 +1,4 @@ -/* $Id: perlmod.c,v 1.17 2000/07/07 02:44:07 hubbe Exp $ */ +/* $Id: perlmod.c,v 1.18 2000/07/28 07:14:20 hubbe Exp $ */ #include "builtin_functions.h" #include "global.h" @@ -11,6 +11,9 @@ #include "mapping.h" #include "perl_machine.h" +/* must be included last */ +#include "module_magic.h" + #ifdef HAVE_PERL /* #define PERL_560 1 */ diff --git a/src/modules/Pipe/pipe.c b/src/modules/Pipe/pipe.c index a2c25aa0b9cec8b0f7147df310ce2d19e85c9fc4..265365ac5071e1ed66ae1ab386c7c5c681d7fff8 100644 --- a/src/modules/Pipe/pipe.c +++ b/src/modules/Pipe/pipe.c @@ -26,7 +26,7 @@ #include <fcntl.h> -RCSID("$Id: pipe.c,v 1.36 2000/07/07 13:59:28 grubba Exp $"); +RCSID("$Id: pipe.c,v 1.37 2000/07/28 07:14:27 hubbe Exp $"); #include "threads.h" #include "stralloc.h" @@ -47,6 +47,10 @@ RCSID("$Id: pipe.c,v 1.36 2000/07/07 13:59:28 grubba Exp $"); #endif #endif +/* must be included last */ +#include "module_magic.h" + + /* #define PIPE_STRING_DEBUG #define PIPE_MMAP_DEBUG diff --git a/src/modules/Postgres/pgresult.c b/src/modules/Postgres/pgresult.c index 3b66d122c181533604a6e2dd55bc21aad32142b4..99a129199693e657c44f13313d4602fc306826c0 100644 --- a/src/modules/Postgres/pgresult.c +++ b/src/modules/Postgres/pgresult.c @@ -1,5 +1,5 @@ /* - * $Id: pgresult.c,v 1.12 2000/04/18 06:54:08 jonasw Exp $ + * $Id: pgresult.c,v 1.13 2000/07/28 07:14:33 hubbe Exp $ * * Postgres95 support for pike/0.5 and up * @@ -63,7 +63,7 @@ #include "builtin_functions.h" #include "module_support.h" -RCSID("$Id: pgresult.c,v 1.12 2000/04/18 06:54:08 jonasw Exp $"); +RCSID("$Id: pgresult.c,v 1.13 2000/07/28 07:14:33 hubbe Exp $"); #ifdef _REENTRANT MUTEX_T pike_postgres_result_mutex STATIC_MUTEX_INIT; @@ -76,6 +76,10 @@ MUTEX_T pike_postgres_result_mutex STATIC_MUTEX_INIT; #include "pg_types.h" +/* must be included last */ +#include "module_magic.h" + + #define THIS ((struct postgres_result_object_data *) fp->current_storage) #ifdef PGRESDEBUG diff --git a/src/modules/Postgres/postgres.c b/src/modules/Postgres/postgres.c index a8f5deeb206eb1c472b74b69f024031aa105c771..85a943aac265e41103d92c2bff3c1e537aeeb221 100644 --- a/src/modules/Postgres/postgres.c +++ b/src/modules/Postgres/postgres.c @@ -48,6 +48,9 @@ MUTEX_T pike_postgres_mutex STATIC_MUTEX_INIT; #include "pg_types.h" +/* must be included last */ +#include "module_magic.h" + #ifdef PGDEBUG #define pgdebug printf #else @@ -56,7 +59,7 @@ static void pgdebug (char * a, ...) {} struct program * postgres_program; -RCSID("$Id: postgres.c,v 1.17 2000/04/18 06:54:08 jonasw Exp $"); +RCSID("$Id: postgres.c,v 1.18 2000/07/28 07:14:33 hubbe Exp $"); #define THIS ((struct pgres_object_data *) fp->current_storage) @@ -506,6 +509,7 @@ void pike_module_exit(void) } #else /* HAVE_POSTGRES */ +#include "module_magic.h" void pike_module_init(void) {} void pike_module_exit(void) {} #endif /* HAVE_POSTGRES */ diff --git a/src/modules/Regexp/glue.c b/src/modules/Regexp/glue.c index b190dc90dce990b18747b5a601a3596baecd5350..450954ed081272fb20273848089b47d59f2d11b8 100644 --- a/src/modules/Regexp/glue.c +++ b/src/modules/Regexp/glue.c @@ -19,7 +19,7 @@ #include "threads.h" #include "module_support.h" -RCSID("$Id: glue.c,v 1.17 2000/07/07 13:58:57 grubba Exp $"); +RCSID("$Id: glue.c,v 1.18 2000/07/28 07:14:40 hubbe Exp $"); #ifdef USE_SYSTEM_REGEXP #include <regexp.h> @@ -39,6 +39,9 @@ struct regexp_glue #endif /* USE_SYSTEM_REGEXP */ +/* must be included last */ +#include "module_magic.h" + #ifdef THIS #undef THIS diff --git a/src/modules/Regexp/pike_regexp.c b/src/modules/Regexp/pike_regexp.c index e5b8e630b6dd4b982ef0b96774942c2faa191a74..fe5d5ebaf57df439ed7330d3a7c2ea4714d7d9ef 100644 --- a/src/modules/Regexp/pike_regexp.c +++ b/src/modules/Regexp/pike_regexp.c @@ -1,5 +1,5 @@ /* - * $Id: pike_regexp.c,v 1.13 1998/11/22 11:05:36 hubbe Exp $ + * $Id: pike_regexp.c,v 1.14 2000/07/28 07:14:40 hubbe Exp $ * * regexp.c - regular expression matching * @@ -68,6 +68,9 @@ #include "pike_memory.h" #include "error.h" +/* must be included last */ +#include "module_magic.h" + /* * The "internal use only" fields in regexp.h are present to pass info from * compile to execute that permits the execute phase to run lots faster on diff --git a/src/modules/SANE/.cvsignore b/src/modules/SANE/.cvsignore index 8f3aaf06ddd557bf57a9a71243ae375037412b36..4b82bc21646fc7110bdd2fd11096c3f7df858236 100644 --- a/src/modules/SANE/.cvsignore +++ b/src/modules/SANE/.cvsignore @@ -1,4 +1,5 @@ .pure +Makefile config.h config.h.in config.log diff --git a/src/modules/SANE/.gitignore b/src/modules/SANE/.gitignore index 0f37cb16355da65a312f164106cf3e3204d0ea3e..11458f6d8e4159becdbbaa1b0d4c3b9d72b92083 100644 --- a/src/modules/SANE/.gitignore +++ b/src/modules/SANE/.gitignore @@ -1,4 +1,5 @@ /.pure +/Makefile /config.h /config.h.in /config.log diff --git a/src/modules/SANE/sane.c b/src/modules/SANE/sane.c index 5b7a09bef8816f9eaff1bd3577c7214ddb1644d6..ff28f56d46287803be109e665cca01b0d0be6191 100644 --- a/src/modules/SANE/sane.c +++ b/src/modules/SANE/sane.c @@ -29,7 +29,10 @@ #include "../Image/image.h" -RCSID("$Id: sane.c,v 1.5 2000/07/07 16:10:07 marcus Exp $"); +/* must be included last */ +#include "module_magic.h" + +RCSID("$Id: sane.c,v 1.6 2000/07/28 07:14:53 hubbe Exp $"); /* **! module SANE @@ -38,7 +41,7 @@ RCSID("$Id: sane.c,v 1.5 2000/07/07 16:10:07 marcus Exp $"); **! library from pike **! **! note -**! $Id: sane.c,v 1.5 2000/07/07 16:10:07 marcus Exp $ +**! $Id: sane.c,v 1.6 2000/07/28 07:14:53 hubbe Exp $ */ static int sane_is_inited; @@ -746,6 +749,7 @@ void pike_module_exit() } #else +#include "module_magic.h" void pike_module_init() {} void pike_module_exit() {} #endif diff --git a/src/modules/Yp/yp.c b/src/modules/Yp/yp.c index debcd9ba40dba2df613f2f6987d0b921de18f27d..3819133e0e498948379984cba57b1b1ef44ccaff 100644 --- a/src/modules/Yp/yp.c +++ b/src/modules/Yp/yp.c @@ -28,7 +28,10 @@ #include "builtin_functions.h" #include "module_support.h" -RCSID("$Id: yp.c,v 1.17 1999/08/03 00:42:53 hubbe Exp $"); +/* must be included last */ +#include "module_magic.h" + +RCSID("$Id: yp.c,v 1.18 2000/07/28 07:15:01 hubbe Exp $"); #define YPERROR(fun,err) do{ if(err) error("yp->%s(): %s\n", (fun), \ yperr_string(err)); }while(0) @@ -253,6 +256,7 @@ void pike_module_exit(void) } #else +#include "module_magic.h" void pike_module_init(void) {} void pike_module_exit(void) {} diff --git a/src/modules/_Charset/charsetmod.c b/src/modules/_Charset/charsetmod.c index 2859e86c4afe7e80d9a50403686abf304d22a7e9..a98b9210637f681fae7e7896cb5d8d14f81b85e8 100644 --- a/src/modules/_Charset/charsetmod.c +++ b/src/modules/_Charset/charsetmod.c @@ -3,7 +3,7 @@ #endif /* HAVE_CONFIG_H */ #include "../../global.h" -RCSID("$Id: charsetmod.c,v 1.19 2000/07/24 11:22:31 lange Exp $"); +RCSID("$Id: charsetmod.c,v 1.20 2000/07/28 07:15:07 hubbe Exp $"); #include "program.h" #include "interpret.h" #include "stralloc.h" @@ -13,6 +13,9 @@ RCSID("$Id: charsetmod.c,v 1.19 2000/07/24 11:22:31 lange Exp $"); #include "iso2022.h" +/* MUST BE LAST INCLUDE */ +#include "module_magic.h" + #ifdef __CHAR_UNSIGNED__ #define SIGNED signed #else diff --git a/src/modules/_Charset/iso2022.c b/src/modules/_Charset/iso2022.c index 0ba243672567ed4a7f42918afab43bad9eb3eb82..41cd1ed0f6809e062e7c3b8bff998c77b265df52 100644 --- a/src/modules/_Charset/iso2022.c +++ b/src/modules/_Charset/iso2022.c @@ -3,7 +3,7 @@ #endif /* HAVE_CONFIG_H */ #include "global.h" -RCSID("$Id: iso2022.c,v 1.15 2000/07/24 11:22:31 lange Exp $"); +RCSID("$Id: iso2022.c,v 1.16 2000/07/28 07:15:07 hubbe Exp $"); #include "program.h" #include "interpret.h" #include "stralloc.h" @@ -13,6 +13,8 @@ RCSID("$Id: iso2022.c,v 1.15 2000/07/24 11:22:31 lange Exp $"); #include "iso2022.h" +/* MUST BE LAST INCLUDE */ +#include "module_magic.h" #define PRGM_NAME "Locale.Charset.ISO2022" diff --git a/src/modules/_Crypto/arcfour.c b/src/modules/_Crypto/arcfour.c index d367ab64c8b8b2f465e5252a61c1dc4d1d0a63a3..c168fdd55f6962e9d64f1da53914fa25e5f09108 100644 --- a/src/modules/_Crypto/arcfour.c +++ b/src/modules/_Crypto/arcfour.c @@ -16,7 +16,10 @@ #include "arcfour.h" -RCSID("$Id: arcfour.c,v 1.10 2000/03/28 12:16:08 grubba Exp $"); +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + +RCSID("$Id: arcfour.c,v 1.11 2000/07/28 07:15:16 hubbe Exp $"); #undef THIS #define THIS ((struct arcfour_ctx *)(fp->current_storage)) @@ -69,7 +72,7 @@ static void f_set_key(INT32 args) } /* string crypt(string) */ -static void f_crypt(INT32 args) +static void f_arcfour_crypt(INT32 args) { int len; struct pike_string *s; @@ -107,7 +110,7 @@ void pike_arcfour_init(void) /* function(string:object) */ ADD_FUNCTION("set_decrypt_key", f_set_key,tFunc(tStr,tObj), 0); /* function(string:string) */ - ADD_FUNCTION("crypt", f_crypt,tFunc(tStr,tStr), 0); + ADD_FUNCTION("crypt", f_arcfour_crypt,tFunc(tStr,tStr), 0); set_init_callback(init_pike_arcfour); set_exit_callback(exit_pike_arcfour); diff --git a/src/modules/_Crypto/cast.c b/src/modules/_Crypto/cast.c index e598abd8f64718b595c8475a961eb0664297652f..e9649bb0748858f8d37d4bdd112665b201ad0e01 100644 --- a/src/modules/_Crypto/cast.c +++ b/src/modules/_Crypto/cast.c @@ -1,5 +1,5 @@ /* - * $Id: cast.c,v 1.6 1999/02/10 21:51:30 hubbe Exp $ + * $Id: cast.c,v 1.7 2000/07/28 07:15:16 hubbe Exp $ * * CAST crypto module for Pike * @@ -22,6 +22,10 @@ #include <cast.h> +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + + struct pike_crypto_cast { struct cast_key key; void (*crypt_fun)(struct cast_key* key, unsigned INT8* inblock, diff --git a/src/modules/_Crypto/cbc.c b/src/modules/_Crypto/cbc.c index 48629214aeb10cc40fadc880de300501dddd8daf..c0067f77d0a9b442bc1d045871e9cf45a5676d17 100644 --- a/src/modules/_Crypto/cbc.c +++ b/src/modules/_Crypto/cbc.c @@ -1,5 +1,5 @@ /* - * $Id: cbc.c,v 1.15 2000/07/07 13:57:15 grubba Exp $ + * $Id: cbc.c,v 1.16 2000/07/28 07:15:16 hubbe Exp $ * * CBC (Cipher Block Chaining Mode) crypto module for Pike. * @@ -28,6 +28,10 @@ /* Prototypes */ #include "crypto.h" +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + + struct pike_crypto_cbc { struct object *object; unsigned INT8 *iv; diff --git a/src/modules/_Crypto/crypto.c b/src/modules/_Crypto/crypto.c index c7ed7f420c142aa00c88d3e868cf566f4f76da44..6d435791fb244f2d2b64ca00bca7f3b478b7edb3 100644 --- a/src/modules/_Crypto/crypto.c +++ b/src/modules/_Crypto/crypto.c @@ -1,5 +1,5 @@ /* - * $Id: crypto.c,v 1.32 2000/07/07 13:57:15 grubba Exp $ + * $Id: crypto.c,v 1.33 2000/07/28 07:15:16 hubbe Exp $ * * A pike module for getting access to some common cryptos. * @@ -37,6 +37,9 @@ /* Prototypes */ #include "crypto.h" +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + struct pike_crypto { struct object *object; INT32 block_size; @@ -306,7 +309,7 @@ static void f_set_decrypt_key(INT32 args) } /* string crypt(string) */ -static void f_crypt(INT32 args) +static void f_crypto_crypt(INT32 args) { unsigned char *result; INT32 roffset = 0; @@ -482,7 +485,7 @@ void pike_crypto_init(void) /* function(string:object) */ ADD_FUNCTION("set_decrypt_key", f_set_decrypt_key,tFunc(tStr,tObj), 0); /* function(string:string) */ - ADD_FUNCTION("crypt", f_crypt,tFunc(tStr,tStr), 0); + ADD_FUNCTION("crypt", f_crypto_crypt,tFunc(tStr,tStr), 0); /* function(void:string) */ ADD_FUNCTION("pad", f_pad,tFunc(tVoid,tStr), 0); diff --git a/src/modules/_Crypto/des.c b/src/modules/_Crypto/des.c index fb865dae7076504083d09d4b36f621e2c0ba52eb..5f859cc1b4bb40fe72dbd0379e5f7e6d3208e1fa 100644 --- a/src/modules/_Crypto/des.c +++ b/src/modules/_Crypto/des.c @@ -1,5 +1,5 @@ /* - * $Id: des.c,v 1.15 2000/07/07 13:57:15 grubba Exp $ + * $Id: des.c,v 1.16 2000/07/28 07:15:16 hubbe Exp $ * * A pike module for getting access to some common cryptos. * @@ -41,6 +41,9 @@ #include <des.h> +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + struct pike_crypto_des { unsigned INT32 method[DES_EXPANDED_KEYLEN]; void (*crypt_fun)(unsigned INT8 *dest, diff --git a/src/modules/_Crypto/idea.c b/src/modules/_Crypto/idea.c index d3994c6751c337b4e2007fcf04d6793c4988b8f1..e72c3006358c9a1fcef7d2d4d4f0bd13b95f6c01 100644 --- a/src/modules/_Crypto/idea.c +++ b/src/modules/_Crypto/idea.c @@ -1,5 +1,5 @@ /* - * $Id: idea.c,v 1.13 1999/02/10 21:51:35 hubbe Exp $ + * $Id: idea.c,v 1.14 2000/07/28 07:15:16 hubbe Exp $ * * IDEA crypto module for Pike * @@ -24,6 +24,9 @@ /* Backend includes */ #include <idea.h> +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + #undef THIS #define THIS ((unsigned INT16 *)(fp->current_storage)) #define OBTOCTX(o) ((unsigned INT16 *)(o->storage)) diff --git a/src/modules/_Crypto/invert.c b/src/modules/_Crypto/invert.c index 5781436e1c0f362ed826c929e3cd56e95f01958e..8beb95a77097d4aadc0482a2699303bc6dec9eeb 100644 --- a/src/modules/_Crypto/invert.c +++ b/src/modules/_Crypto/invert.c @@ -1,5 +1,5 @@ /* - * $Id: invert.c,v 1.8 1999/02/10 21:51:36 hubbe Exp $ + * $Id: invert.c,v 1.9 2000/07/28 07:15:16 hubbe Exp $ * * INVERT crypto module for Pike * @@ -24,6 +24,9 @@ #include "stralloc.h" #include "builtin_functions.h" +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + /* * Globals */ diff --git a/src/modules/_Crypto/md5.c b/src/modules/_Crypto/md5.c index 6d61a278eed2739e05469116ae094edd4f65ea6c..fa44e6d73e44ec9ba149e81cb27b61359c0ed390 100644 --- a/src/modules/_Crypto/md5.c +++ b/src/modules/_Crypto/md5.c @@ -1,5 +1,5 @@ /* - * $Id: md5.c,v 1.12 1999/02/10 21:51:38 hubbe Exp $ + * $Id: md5.c,v 1.13 2000/07/28 07:15:16 hubbe Exp $ * * A pike module for getting access to some common cryptos. * @@ -24,6 +24,9 @@ #include <md5.h> +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + #undef THIS #define THIS ((struct md5_ctx *)(fp->current_storage)) #define OBTOCTX(o) ((struct md5_ctx *)(o->storage)) diff --git a/src/modules/_Crypto/nt.c b/src/modules/_Crypto/nt.c index 2a6438eae7dd89154ccd551fe7d42b942d7a63d2..270a25c5bf6022004e61fc8db97ca5df77bef5bd 100644 --- a/src/modules/_Crypto/nt.c +++ b/src/modules/_Crypto/nt.c @@ -1,5 +1,5 @@ /* - * $Id: nt.c,v 1.2 2000/01/10 00:41:48 hubbe Exp $ + * $Id: nt.c,v 1.3 2000/07/28 07:15:16 hubbe Exp $ * * NT crypto stuff for Pike */ @@ -24,6 +24,8 @@ #include <wincrypt.h> +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" static struct program *cryptcontext_program = NULL; diff --git a/src/modules/_Crypto/pipe.c b/src/modules/_Crypto/pipe.c index 70a159cedab2cbfbb6d23fcd81224fdefda22607..07097680f5f7dc7f92f60fd68e8cf06a3b22c157 100644 --- a/src/modules/_Crypto/pipe.c +++ b/src/modules/_Crypto/pipe.c @@ -1,5 +1,5 @@ /* - * $Id: pipe.c,v 1.16 2000/07/07 13:57:15 grubba Exp $ + * $Id: pipe.c,v 1.17 2000/07/28 07:15:16 hubbe Exp $ * * PIPE crypto module for Pike. * @@ -28,6 +28,9 @@ /* Prototypes */ #include "crypto.h" +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + struct pike_crypto_pipe { struct object **objects; INT32 num_objs; diff --git a/src/modules/_Crypto/rsa.c b/src/modules/_Crypto/rsa.c index f66bc90ed99f13e9cbbdba3f04eb52dc9b0b1448..569e7eccf1d1b67fffc58b074051dabc8c96fb16 100644 --- a/src/modules/_Crypto/rsa.c +++ b/src/modules/_Crypto/rsa.c @@ -1,5 +1,5 @@ /* - * $Id: rsa.c,v 1.21 2000/07/07 13:57:15 grubba Exp $ + * $Id: rsa.c,v 1.22 2000/07/28 07:15:16 hubbe Exp $ * * Glue to RSA BSAFE's RSA implementation. * @@ -31,7 +31,10 @@ #include <bsafe.h> -RCSID("$Id: rsa.c,v 1.21 2000/07/07 13:57:15 grubba Exp $"); +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + +RCSID("$Id: rsa.c,v 1.22 2000/07/28 07:15:16 hubbe Exp $"); struct pike_rsa_data { diff --git a/src/modules/_Crypto/sha.c b/src/modules/_Crypto/sha.c index bae09246d386ff7bf00482b0f136f8a0ff0b7072..ddf3a1f0f5a8f126e35e8985d342d784a80a4143 100644 --- a/src/modules/_Crypto/sha.c +++ b/src/modules/_Crypto/sha.c @@ -1,4 +1,4 @@ -/* $Id: sha.c,v 1.15 1999/02/10 21:51:41 hubbe Exp $ +/* $Id: sha.c,v 1.16 2000/07/28 07:15:16 hubbe Exp $ * * Written by Niels M�ller */ @@ -16,10 +16,13 @@ #include "module_support.h" #include "las.h" -RCSID("$Id: sha.c,v 1.15 1999/02/10 21:51:41 hubbe Exp $"); +RCSID("$Id: sha.c,v 1.16 2000/07/28 07:15:16 hubbe Exp $"); #include <sha.h> +/* THIS MUST BE INCLUDED LAST */ +#include "module_magic.h" + #undef THIS #define THIS ((struct sha_ctx *)(fp->current_storage)) #define OBTOCTX(o) ((struct sha_ctx *)(o->storage)) diff --git a/src/modules/_Image_JPEG/image_jpeg.c b/src/modules/_Image_JPEG/image_jpeg.c index 6013db3bc210699cd419987120cd4fb543b85af9..2ac12517f7d50c49fca9c0abfa163c74c776e110 100644 --- a/src/modules/_Image_JPEG/image_jpeg.c +++ b/src/modules/_Image_JPEG/image_jpeg.c @@ -1,5 +1,5 @@ /* - * $Id: image_jpeg.c,v 1.29 2000/07/04 14:49:49 grubba Exp $ + * $Id: image_jpeg.c,v 1.30 2000/07/28 07:15:23 hubbe Exp $ */ #include "global.h" @@ -37,7 +37,7 @@ #ifdef HAVE_STDLIB_H #undef HAVE_STDLIB_H #endif -RCSID("$Id: image_jpeg.c,v 1.29 2000/07/04 14:49:49 grubba Exp $"); +RCSID("$Id: image_jpeg.c,v 1.30 2000/07/28 07:15:23 hubbe Exp $"); /* For some reason EXTERN can be defined here. * This is not good, since it confuses compilation.h. @@ -60,6 +60,9 @@ RCSID("$Id: image_jpeg.c,v 1.29 2000/07/04 14:49:49 grubba Exp $"); #include "builtin_functions.h" #include "module_support.h" +/* This must be included last! */ +#include "module_magic.h" + #ifdef HAVE_JPEGLIB_H #include "../Image/image.h" @@ -952,8 +955,6 @@ void image_jpeg_quant_tables(INT32 args) /*** module init & exit & stuff *****************************************/ -void f_index(INT32 args); - void pike_module_exit(void) { diff --git a/src/modules/_Image_TIFF/image_tiff.c b/src/modules/_Image_TIFF/image_tiff.c index 47c311dce11586c5cedf1de9c9baae07346fb7d1..4870465c15a1b5ac9a59fd99461f8d4711c9f823 100644 --- a/src/modules/_Image_TIFF/image_tiff.c +++ b/src/modules/_Image_TIFF/image_tiff.c @@ -6,14 +6,8 @@ **! */ - - - - - - #ifdef HAVE_LIBTIFF -RCSID("$Id: image_tiff.c,v 1.14 2000/07/07 13:57:27 grubba Exp $"); +RCSID("$Id: image_tiff.c,v 1.15 2000/07/28 07:15:29 hubbe Exp $"); #include "global.h" #include "machine.h" @@ -40,6 +34,9 @@ RCSID("$Id: image_tiff.c,v 1.14 2000/07/07 13:57:27 grubba Exp $"); #endif #include <tiffio.h> +/* This must be included last! */ +#include "module_magic.h" + #ifdef DYNAMIC_MODULE static struct program *image_program=NULL; static struct program *image_colortable_program=NULL; @@ -774,11 +771,15 @@ static void image_tiff_encode( INT32 args ) void my_tiff_warning_handler(const char* module, const char* fmt, ...){} void my_tiff_error_handler(const char* module, const char* fmt, ...){} +#else + +/* This must be included last! */ +#include "module_magic.h" + #endif /* HAVE_LIBTIFF */ void pike_module_init(void) { - extern void f_index(INT32); #ifdef HAVE_LIBTIFF #ifdef DYNAMIC_MODULE push_string(make_shared_string("Image")); push_int(0); diff --git a/src/modules/_Image_TTF/image_ttf.c b/src/modules/_Image_TTF/image_ttf.c index 4da2ab3a8db6d7e73235551392ad78df8a5c76db..445de32fef7592777b6271ece73f44752bcace3c 100644 --- a/src/modules/_Image_TTF/image_ttf.c +++ b/src/modules/_Image_TTF/image_ttf.c @@ -1,12 +1,12 @@ /* - * $Id: image_ttf.c,v 1.30 2000/07/07 13:57:44 grubba Exp $ + * $Id: image_ttf.c,v 1.31 2000/07/28 07:15:35 hubbe Exp $ */ #include "config.h" #include "global.h" -RCSID("$Id: image_ttf.c,v 1.30 2000/07/07 13:57:44 grubba Exp $"); +RCSID("$Id: image_ttf.c,v 1.31 2000/07/28 07:15:35 hubbe Exp $"); #ifdef HAVE_LIBTTF #if defined(HAVE_FREETYPE_FREETYPE_H) && defined(HAVE_FREETYPE_FTXKERN_H) @@ -37,6 +37,7 @@ RCSID("$Id: image_ttf.c,v 1.30 2000/07/07 13:57:44 grubba Exp $"); #ifdef HAVE_LIBTTF #include "../Image/image.h" + #ifdef DYNAMIC_MODULE static struct program *image_program=NULL; #else @@ -48,6 +49,9 @@ static TT_Engine engine; #endif /* HAVE_LIBTTF */ +/* This must be included last! */ +#include "module_magic.h" + static struct pike_string *param_baseline; static struct pike_string *param_quality; @@ -1216,7 +1220,6 @@ static void image_ttf_faceinstance_face(INT32 args) /*** module init & exit & stuff *****************************************/ -void f_index(INT32 args); void pike_module_exit(void) { diff --git a/src/modules/_Image_XFace/image_xface.c b/src/modules/_Image_XFace/image_xface.c index 61acea8b10dcbac5fc69e7cf88e37bd260711764..acb547a9f03a65e7bbc7bfe75d56fd37b969f20f 100644 --- a/src/modules/_Image_XFace/image_xface.c +++ b/src/modules/_Image_XFace/image_xface.c @@ -1,5 +1,5 @@ #include "global.h" -RCSID("$Id: image_xface.c,v 1.8 1999/08/08 13:15:16 grubba Exp $"); +RCSID("$Id: image_xface.c,v 1.9 2000/07/28 07:15:41 hubbe Exp $"); #include "config.h" @@ -38,6 +38,9 @@ RCSID("$Id: image_xface.c,v 1.8 1999/08/08 13:15:16 grubba Exp $"); #include "../Image/image.h" +/* This must be included last! */ +#include "module_magic.h" + #ifdef DYNAMIC_MODULE static struct program *image_program=NULL; #else diff --git a/src/modules/dynamic_module_makefile.in b/src/modules/dynamic_module_makefile.in index 1b473e345e05b07f6899470fe2d5267f2f09e919..8a5757a2b36d500961de1e94ab65c3190ee5e87a 100644 --- a/src/modules/dynamic_module_makefile.in +++ b/src/modules/dynamic_module_makefile.in @@ -1,5 +1,5 @@ # -# $Id: dynamic_module_makefile.in,v 1.66 2000/04/11 20:59:03 grubba Exp $ +# $Id: dynamic_module_makefile.in,v 1.67 2000/07/28 07:11:41 hubbe Exp $ # @@ -16,7 +16,7 @@ BUILD_BASE=../.. MODULE_BASE=.. PIKE_INCLUDES=-I$(PIKE_SRC_DIR) -I$(BUILD_BASE) -PREFLAGS=-I. -I$(SRCDIR) $(PIKE_INCLUDES) -I. $(MODULE_CPPFLAGS) $(DEFINES) -DDYNAMIC_MODULE +PREFLAGS=-I. -I$(SRCDIR) $(PIKE_INCLUDES) -I. $(MODULE_CPPFLAGS) $(DEFINES) CFLAGS=$(MODULE_CFLAGS) $(PREFLAGS) $(OTHERFLAGS) @CCSHARED@ NOOPT_CFLAGS=$(PREFLAGS) $(NOOPTFLAGS) @CCSHARED@ $(MODULE_CFLAGS) diff --git a/src/modules/spider/discdate.c b/src/modules/spider/discdate.c index df8905cd38b627ac1e115dc21f9077e08c3cc9f8..47680f9a6da6d110c40eaf86776b10deef46fa94 100644 --- a/src/modules/spider/discdate.c +++ b/src/modules/spider/discdate.c @@ -23,7 +23,10 @@ #include <string.h> #include <stdio.h> -RCSID("$Id: discdate.c,v 1.6 1998/03/28 13:51:48 grubba Exp $"); +/* This must be included last! */ +#include "module_magic.h" + +RCSID("$Id: discdate.c,v 1.7 2000/07/28 07:15:49 hubbe Exp $"); struct disc_time { diff --git a/src/modules/spider/spider.c b/src/modules/spider/spider.c index 5fc642bf593815ef82272a75115e6968a3de841c..0f1e3924d7ee6ba2e4234266ebf0220713e7f176 100644 --- a/src/modules/spider/spider.c +++ b/src/modules/spider/spider.c @@ -43,7 +43,7 @@ #include "threads.h" #include "operators.h" -RCSID("$Id: spider.c,v 1.93 2000/06/29 09:55:04 per Exp $"); +RCSID("$Id: spider.c,v 1.94 2000/07/28 07:15:49 hubbe Exp $"); #ifdef HAVE_PWD_H #include <pwd.h> @@ -86,6 +86,10 @@ RCSID("$Id: spider.c,v 1.93 2000/06/29 09:55:04 per Exp $"); #include "dmalloc.h" + +/* This must be included last! */ +#include "module_magic.h" + #define MAX_PARSE_RECURSE 102 void do_html_parse(struct pike_string *ss, @@ -972,7 +976,6 @@ void f_get_all_active_fd(INT32 args) { int i,fds,q, ne; struct stat foo; - extern int fds_size; ne = fds_size; if( MAX_OPEN_FILEDESCRIPTORS > ne ) diff --git a/src/modules/spider/stardate.c b/src/modules/spider/stardate.c index 9396f5546cd110037f115e8c333dd9c0079773d3..3816f9ae9137f7b41d233f90e409a370f8a5fd29 100644 --- a/src/modules/spider/stardate.c +++ b/src/modules/spider/stardate.c @@ -1,5 +1,5 @@ /* - * $Id: stardate.c,v 1.8 1998/07/04 17:04:08 grubba Exp $ + * $Id: stardate.c,v 1.9 2000/07/28 07:15:49 hubbe Exp $ */ #include "global.h" @@ -17,7 +17,7 @@ #include "builtin_functions.h" #include "error.h" -RCSID("$Id: stardate.c,v 1.8 1998/07/04 17:04:08 grubba Exp $"); +RCSID("$Id: stardate.c,v 1.9 2000/07/28 07:15:49 hubbe Exp $"); #ifdef HAVE_SYS_TIME_H #include <sys/time.h> @@ -25,6 +25,9 @@ RCSID("$Id: stardate.c,v 1.8 1998/07/04 17:04:08 grubba Exp $"); #include <time.h> #define FIT(x,y) while((x)<0)(x)+=(y);while((x)>(y))(x)-=(y) +/* This must be included last! */ +#include "module_magic.h" + #define MAXPRECISION 7 #define OUTPUTFORMAT "%%%03d.%df" diff --git a/src/modules/spider/streamed_parser.c b/src/modules/spider/streamed_parser.c index 9dde903092ed2d5933da16d5792017c05d1fe871..32938e1f49c41e0d5c7d030749a799d3f9c9d357 100644 --- a/src/modules/spider/streamed_parser.c +++ b/src/modules/spider/streamed_parser.c @@ -1,5 +1,5 @@ /* - * $Id: streamed_parser.c,v 1.11 1998/07/04 17:04:49 grubba Exp $ + * $Id: streamed_parser.c,v 1.12 2000/07/28 07:15:49 hubbe Exp $ */ #include "global.h" @@ -24,7 +24,10 @@ #include "streamed_parser.h" -RCSID("$Id: streamed_parser.c,v 1.11 1998/07/04 17:04:49 grubba Exp $"); +/* This must be included last! */ +#include "module_magic.h" + +RCSID("$Id: streamed_parser.c,v 1.12 2000/07/28 07:15:49 hubbe Exp $"); #ifdef ENABLE_STREAMED_PARSER diff --git a/src/modules/spider/xml.c b/src/modules/spider/xml.c index b6ec6f9d1cecc0c811d82555c501fa458e493f61..0e797455cd9f4398621d3e206c5417c32a7d871b 100644 --- a/src/modules/spider/xml.c +++ b/src/modules/spider/xml.c @@ -18,6 +18,9 @@ #include "opcodes.h" #include "block_alloc.h" +/* This must be included last! */ +#include "module_magic.h" + /* FIXME: * recursive parsing will lock make the parser lock or * use up all memory and then crash... diff --git a/src/modules/sybase/.cvsignore b/src/modules/sybase/.cvsignore index 4883e34940ed762e1b379ab6966561f24199b3c9..e5276b370063c3e87ce7ac0a02fc31a789a9c4dc 100644 --- a/src/modules/sybase/.cvsignore +++ b/src/modules/sybase/.cvsignore @@ -1,4 +1,14 @@ +Makefile +config.log +config.status configure dependencies +linker_options +make_variables +modlist_headers +modlist_segment +module_testsuite +stamp-h stamp-h.in +sybase_config.h sybase_config.h.in diff --git a/src/modules/sybase/.gitignore b/src/modules/sybase/.gitignore index 25c610e638375af21baae4b07e21039fbd7b5148..20441abdc3c971d06a759029537965829cd74017 100644 --- a/src/modules/sybase/.gitignore +++ b/src/modules/sybase/.gitignore @@ -1,4 +1,14 @@ +/Makefile +/config.log +/config.status /configure /dependencies +/linker_options +/make_variables +/modlist_headers +/modlist_segment +/module_testsuite +/stamp-h /stamp-h.in +/sybase_config.h /sybase_config.h.in diff --git a/src/modules/sybase/sybase.c b/src/modules/sybase/sybase.c index ee97be64dcf3fabb3c33ebd896d96d746c301935..29a43817f1b09d6992a95136dc11a18bada5db4c 100644 --- a/src/modules/sybase/sybase.c +++ b/src/modules/sybase/sybase.c @@ -24,7 +24,7 @@ #include "sybase_config.h" #include "global.h" -RCSID("$Id: sybase.c,v 1.3 2000/05/09 23:13:34 neotron Exp $"); +RCSID("$Id: sybase.c,v 1.4 2000/07/28 07:15:57 hubbe Exp $"); #ifdef HAVE_SYBASE @@ -44,6 +44,8 @@ RCSID("$Id: sybase.c,v 1.3 2000/05/09 23:13:34 neotron Exp $"); #include "sybase.h" +/* This must be included last! */ +#include "module_magic.h" /* define this to enable debugging */ /* #define SYBDEBUG */ @@ -1249,6 +1251,9 @@ void pike_module_init (void) { #else /* HAVE_SYBASE */ +/* This must be included last! */ +#include "module_magic.h" + void pike_module_init (void) {} void pike_module_exit (void) {} #endif /* HAVE_SYBASE */ diff --git a/src/modules/system/configure.in b/src/modules/system/configure.in index e05af47eca998f5125ba61a383b324f214fe111f..b7b0f9d7ec11d359ed9958162ae1c0d9bc34e835 100644 --- a/src/modules/system/configure.in +++ b/src/modules/system/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.34 2000/01/17 02:34:04 hubbe Exp $ +# $Id: configure.in,v 1.35 2000/07/28 07:16:04 hubbe Exp $ AC_INIT(system.c) AC_CONFIG_HEADER(system_machine.h) @@ -8,6 +8,12 @@ AC_CHECK_LIB(bind, __inet_ntoa) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) +if test x"$pike_cv_sys_os" = xWindows_NT ; then + # FIXME: These look suspiciouly much like 32bit versions. + # We probably want to use 64bit versions on IA64. + LIBS="-lkernel32 -lws2_32 -ladvapi32 $LIBS" +fi + AC_HAVE_HEADERS(syslog.h sys/syslog.h sys/types.h errno.h unistd.h pwd.h \ sys/conf.h sys/socket.h netinet/in.h arpa/inet.h netdb.h stdarg.h \ sys/utsname.h pwd.h passwd.h shadow.h grp.h sys/stat.h winsock.h \ diff --git a/src/post_modules/GL/auto.c.in b/src/post_modules/GL/auto.c.in index 028febd0396cfe0b5ffcc92516c6b63777cbd181..82dcdd5c545dccafb99985061811d3a2ce705f11 100644 --- a/src/post_modules/GL/auto.c.in +++ b/src/post_modules/GL/auto.c.in @@ -1,5 +1,5 @@ /* - * $Id: auto.c.in,v 1.13 1999/11/07 01:43:31 per fake $ + * $Id: auto.c.in,v 1.14 2000/07/28 07:16:09 hubbe Exp $ * */ @@ -7,7 +7,7 @@ #include "config.h" -RCSID("$Id: auto.c.in,v 1.13 1999/11/07 01:43:31 per fake $"); +RCSID("$Id: auto.c.in,v 1.14 2000/07/28 07:16:09 hubbe Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" @@ -29,6 +29,8 @@ RCSID("$Id: auto.c.in,v 1.13 1999/11/07 01:43:31 per fake $"); #include <GL/gl.h> #endif /* HAVE_GL_GL_H */ +#include "module_magic.h" + #define ZT_INT 1 #define ZT_FLOAT 2 #define ZT_DOUBLE 4 diff --git a/src/post_modules/GL/top.c b/src/post_modules/GL/top.c index ae5e1c700ebf9a4181ab7c321375e29ac23f2718..5062f746a29f464994fbd016f3c0c4fef1904f20 100644 --- a/src/post_modules/GL/top.c +++ b/src/post_modules/GL/top.c @@ -1,5 +1,5 @@ /* - * $Id: top.c,v 1.11 1999/11/07 01:43:31 per fake $ + * $Id: top.c,v 1.12 2000/07/28 07:16:09 hubbe Exp $ * */ @@ -22,10 +22,11 @@ #endif /* HAVE_GL */ +#include "module_magic.h" #include "global.h" -RCSID("$Id: top.c,v 1.11 1999/11/07 01:43:31 per fake $"); +RCSID("$Id: top.c,v 1.12 2000/07/28 07:16:09 hubbe Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" diff --git a/src/post_modules/GLUT/auto.c.in b/src/post_modules/GLUT/auto.c.in index 3a4fcb3e7fa1cc4dd42340bcc956ed0cc89c1625..af1dd1055a113ba1c138826ac1588ca09b24dd8c 100644 --- a/src/post_modules/GLUT/auto.c.in +++ b/src/post_modules/GLUT/auto.c.in @@ -1,5 +1,5 @@ /* - * $Id: auto.c.in,v 1.1 1999/11/14 00:01:49 per Exp $ + * $Id: auto.c.in,v 1.2 2000/07/28 07:16:16 hubbe Exp $ * */ @@ -7,7 +7,7 @@ #include "config.h" -RCSID("$Id: auto.c.in,v 1.1 1999/11/14 00:01:49 per Exp $"); +RCSID("$Id: auto.c.in,v 1.2 2000/07/28 07:16:16 hubbe Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" @@ -24,6 +24,8 @@ RCSID("$Id: auto.c.in,v 1.1 1999/11/14 00:01:49 per Exp $"); #include <GL/glut.h> #endif +#include "module_magic.h" + static void pre_init() { } diff --git a/src/post_modules/GLUT/top.c b/src/post_modules/GLUT/top.c index e69d35a6530c876d930c572a2068bbbccc8971d6..a72892e50038903038e6e5a325c4be71df5184b5 100644 --- a/src/post_modules/GLUT/top.c +++ b/src/post_modules/GLUT/top.c @@ -1,5 +1,5 @@ /* - * $Id: top.c,v 1.2 1999/12/12 21:51:31 per Exp $ + * $Id: top.c,v 1.3 2000/07/28 07:16:16 hubbe Exp $ * */ @@ -7,7 +7,7 @@ #include "config.h" -RCSID("$Id: top.c,v 1.2 1999/12/12 21:51:31 per Exp $"); +RCSID("$Id: top.c,v 1.3 2000/07/28 07:16:16 hubbe Exp $"); #include "stralloc.h" #include "pike_macros.h" #include "object.h" @@ -16,6 +16,8 @@ RCSID("$Id: top.c,v 1.2 1999/12/12 21:51:31 per Exp $"); #include "builtin_functions.h" #include "error.h" +#include "module_magic.h" + #ifdef HAVE_LIBGLUT #ifdef HAVE_GL_GLUT_H #define GLUT_API_VERSION 4 diff --git a/src/post_modules/GTK/dummy.c b/src/post_modules/GTK/dummy.c index 4d71c29d2dc868b8f4af61416e714fadc5d572d1..83046822170e357a181ac8e17e70837aa71844b5 100644 --- a/src/post_modules/GTK/dummy.c +++ b/src/post_modules/GTK/dummy.c @@ -1,9 +1,11 @@ #include "global.h" #include "config.h" +#include "module_magic.h" -RCSID("$Id: dummy.c,v 1.1 1999/11/07 01:38:48 per Exp $"); +RCSID("$Id: dummy.c,v 1.2 2000/07/28 07:16:22 hubbe Exp $"); /* Well... Sort of basic, right? :-) */ + void pike_module_init() { } diff --git a/src/post_modules/GTK/pgtk.h b/src/post_modules/GTK/pgtk.h index e36fdabc54916461feee9fbd119ca762b05bf035..84cd775feb56a39c860143c4f77efe758233a83c 100644 --- a/src/post_modules/GTK/pgtk.h +++ b/src/post_modules/GTK/pgtk.h @@ -40,6 +40,8 @@ #define GTK_ACCEL_GROUP(X) ((void *)X) #include "../../modules/Image/image.h" +#include "module_magic.h" + struct object_wrapper { GtkObject *obj;