From dce047d22f3830ef79f4f94695c84c5fca8594c9 Mon Sep 17 00:00:00 2001 From: "Anders S. Mortensen" Date: Mon, 23 Oct 2000 13:22:42 +0000 Subject: [PATCH] Fixed the problem sv_undef. The package should now compile with Perl 5.6.0. --- Makefile | 170 ++++++++++++++++++++++++++++++++++++------------------- SimpleServer.c | 72 +++++++++++------------ SimpleServer.xs | 4 +- 3 files changed, 151 insertions(+), 95 deletions(-) diff --git a/Makefile b/Makefile index fa47120..571f248 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This Makefile is for the Net::Z3950::SimpleServer extension to perl. # # It was generated automatically by MakeMaker version -# 5.4302 (Revision: 1.222) from the contents of +# 5.45 (Revision: 1.222) from the contents of # Makefile.PL. Don't edit this file, edit Makefile.PL instead. # # ANY CHANGES MADE HERE WILL BE LOST! @@ -21,7 +21,7 @@ # --- MakeMaker const_config section: -# These definitions are from config.sh (via /usr/lib/perl5/5.00503/i386-linux/Config.pm) +# These definitions are from config.sh (via /usr/local/lib/perl5/5.6.0/i686-linux/Config.pm) # They may have been overridden via Makefile.PL or on the command line AR = ar @@ -33,14 +33,15 @@ DLSRC = dl_dlopen.xs LD = cc LDDLFLAGS = -shared -L/usr/local/lib LDFLAGS = -L/usr/local/lib -LIBC = +LIBC = /lib/libc-2.1.3.so LIB_EXT = .a OBJ_EXT = .o OSNAME = linux -OSVERS = 2.2.5-22smp +OSVERS = 2.2.14-5.0 RANLIB = : SO = so EXE_EXT = +FULL_AR = /usr/bin/ar # --- MakeMaker constants section: @@ -56,33 +57,35 @@ INST_EXE = blib/script INST_LIB = blib/lib INST_ARCHLIB = blib/arch INST_SCRIPT = blib/script -PREFIX = /usr +PREFIX = /usr/local INSTALLDIRS = site -INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.00503 -INSTALLARCHLIB = $(PREFIX)/lib/perl5/5.00503/i386-linux -INSTALLSITELIB = $(PREFIX)/lib/perl5/site_perl/5.005 -INSTALLSITEARCH = $(PREFIX)/lib/perl5/site_perl/5.005/i386-linux +INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.6.0 +INSTALLARCHLIB = $(PREFIX)/lib/perl5/5.6.0/i686-linux +INSTALLSITELIB = $(PREFIX)/lib/perl5/site_perl/5.6.0 +INSTALLSITEARCH = $(PREFIX)/lib/perl5/site_perl/5.6.0/i686-linux INSTALLBIN = $(PREFIX)/bin INSTALLSCRIPT = $(PREFIX)/bin -PERL_LIB = /usr/lib/perl5/5.00503 -PERL_ARCHLIB = /usr/lib/perl5/5.00503/i386-linux -SITELIBEXP = /usr/lib/perl5/site_perl/5.005 -SITEARCHEXP = /usr/lib/perl5/site_perl/5.005/i386-linux +PERL_LIB = /usr/local/lib/perl5/5.6.0 +PERL_ARCHLIB = /usr/local/lib/perl5/5.6.0/i686-linux +SITELIBEXP = /usr/local/lib/perl5/site_perl/5.6.0 +SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.6.0/i686-linux LIBPERL_A = libperl.a FIRST_MAKEFILE = Makefile MAKE_APERL_FILE = Makefile.aperl PERLMAINCC = $(CC) -PERL_INC = /usr/lib/perl5/5.00503/i386-linux/CORE +PERL_INC = /usr/local/lib/perl5/5.6.0/i686-linux/CORE PERL = /usr/bin/perl FULLPERL = /usr/bin/perl +FULL_AR = /usr/bin/ar VERSION_MACRO = VERSION DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" XS_VERSION_MACRO = XS_VERSION XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" +PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -MAKEMAKER = /usr/lib/perl5/5.00503/ExtUtils/MakeMaker.pm -MM_VERSION = 5.4302 +MAKEMAKER = /usr/local/lib/perl5/5.6.0/ExtUtils/MakeMaker.pm +MM_VERSION = 5.45 # FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) @@ -105,13 +108,16 @@ XS_FILES= SimpleServer.xs C_FILES = SimpleServer.c O_FILES = SimpleServer.o H_FILES = +HTMLLIBPODS = +HTMLSCRIPTPODS = MAN1PODS = MAN3PODS = SimpleServer.pm +HTMLEXT = html INST_MAN1DIR = blib/man1 INSTALLMAN1DIR = $(PREFIX)/man/man1 MAN1EXT = 1 INST_MAN3DIR = blib/man3 -INSTALLMAN3DIR = $(PREFIX)/lib/perl5/man/man3 +INSTALLMAN3DIR = $(PREFIX)/man/man3 MAN3EXT = 3 PERM_RW = 644 PERM_RWX = 755 @@ -153,16 +159,16 @@ TO_INST_PM = OID.pm \ SimpleServer.pm \ ztest.pl -PM_TO_BLIB = SQL_test.pl \ - $(INST_LIBDIR)/SQL_test.pl \ +PM_TO_BLIB = ztest.pl \ + $(INST_LIBDIR)/ztest.pl \ SQL.pm \ $(INST_LIBDIR)/SQL.pm \ - ztest.pl \ - $(INST_LIBDIR)/ztest.pl \ - SimpleServer.pm \ - $(INST_LIBDIR)/SimpleServer.pm \ OID.pm \ - $(INST_LIBDIR)/OID.pm + $(INST_LIBDIR)/OID.pm \ + SQL_test.pl \ + $(INST_LIBDIR)/SQL_test.pl \ + SimpleServer.pm \ + $(INST_LIBDIR)/SimpleServer.pm # --- MakeMaker tool_autosplit section: @@ -173,10 +179,10 @@ AUTOSPLITFILE = $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e 'use AutoSplit;au # --- MakeMaker tool_xsubpp section: -XSUBPPDIR = /usr/lib/perl5/5.00503/ExtUtils +XSUBPPDIR = /usr/local/lib/perl5/5.6.0/ExtUtils XSUBPP = $(XSUBPPDIR)/xsubpp XSPROTOARG = -XSUBPPDEPS = $(XSUBPPDIR)/typemap +XSUBPPDEPS = $(XSUBPPDIR)/typemap $(XSUBPP) XSUBPPARGS = -typemap $(XSUBPPDIR)/typemap @@ -257,11 +263,12 @@ DIST_DEFAULT = tardist # --- MakeMaker cflags section: -CCFLAGS = -Dbool=char -DHAS_BOOL -I/usr/local/include -OPTIMIZE = -O2 -m486 -fno-strength-reduce +CCFLAGS = -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +OPTIMIZE = -O2 PERLTYPE = LARGE = SPLIT = +MPOLLUTE = # --- MakeMaker const_loadlibs section: @@ -277,7 +284,7 @@ LD_RUN_PATH = /usr/local/lib # --- MakeMaker const_cccmd section: CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \ - $(PERLTYPE) $(LARGE) $(SPLIT) $(DEFINE_VERSION) \ + $(PERLTYPE) $(LARGE) $(SPLIT) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) # --- MakeMaker post_constants section: @@ -313,13 +320,13 @@ PASTHRU = LIB="$(LIB)"\ # --- MakeMaker xs_c section: .xs.c: - $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.c + $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c # --- MakeMaker xs_o section: .xs$(OBJ_EXT): - $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.c + $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c @@ -327,7 +334,7 @@ PASTHRU = LIB="$(LIB)"\ #all :: config $(INST_PM) subdirs linkext manifypods -all :: pure_all manifypods +all :: pure_all htmlifypods manifypods @$(NOOP) pure_all :: config pm_to_blib subdirs linkext @@ -345,25 +352,21 @@ config :: $(INST_ARCHAUTODIR)/.exists config :: $(INST_AUTODIR)/.exists @$(NOOP) -config :: Version_check - @$(NOOP) - - -$(INST_AUTODIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h +$(INST_AUTODIR)/.exists :: /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h @$(MKPATH) $(INST_AUTODIR) - @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_AUTODIR)/.exists + @$(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h $(INST_AUTODIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_AUTODIR) -$(INST_LIBDIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h +$(INST_LIBDIR)/.exists :: /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h @$(MKPATH) $(INST_LIBDIR) - @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_LIBDIR)/.exists + @$(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h $(INST_LIBDIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_LIBDIR) -$(INST_ARCHAUTODIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h +$(INST_ARCHAUTODIR)/.exists :: /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h @$(MKPATH) $(INST_ARCHAUTODIR) - @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_ARCHAUTODIR)/.exists + @$(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h $(INST_ARCHAUTODIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR) @@ -371,9 +374,9 @@ config :: $(INST_MAN3DIR)/.exists @$(NOOP) -$(INST_MAN3DIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h +$(INST_MAN3DIR)/.exists :: /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h @$(MKPATH) $(INST_MAN3DIR) - @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_MAN3DIR)/.exists + @$(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.6.0/i686-linux/CORE/perl.h $(INST_MAN3DIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_MAN3DIR) @@ -451,14 +454,20 @@ static :: Makefile $(INST_STATIC) $(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)/.exists $(RM_RF) $@ - $(AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@ + $(FULL_AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@ $(CHMOD) $(PERM_RWX) $@ @echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld +# --- MakeMaker htmlifypods section: + +htmlifypods : pure_all + @$(NOOP) + + # --- MakeMaker manifypods section: -POD2MAN_EXE = /usr/bin/pod2man +POD2MAN_EXE = /usr/local/bin/pod2man POD2MAN = $(PERL) -we '%m=@ARGV;for (keys %m){' \ -e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "Makefile";' \ -e 'print "Manifying $$m{$$_}\n";' \ @@ -486,7 +495,7 @@ manifypods : pure_all SimpleServer.pm # the Makefile here so a later make realclean still has a makefile to use. clean :: - -rm -rf SimpleServer.c ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all perlmain.c mon.out core so_locations pm_to_blib *~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def $(BASEEXT).exp + -rm -rf SimpleServer.c ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all perlmain.c mon.out core core.*perl.*.? *perl.core so_locations pm_to_blib *~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def $(BASEEXT).exp -mv Makefile Makefile.old $(DEV_NULL) @@ -497,7 +506,7 @@ realclean purge :: clean rm -rf $(INST_AUTODIR) $(INST_ARCHAUTODIR) rm -f $(INST_DYNAMIC) $(INST_BOOT) rm -f $(INST_STATIC) - rm -f $(INST_LIBDIR)/SQL_test.pl $(INST_LIBDIR)/SQL.pm $(INST_LIBDIR)/ztest.pl $(INST_LIBDIR)/SimpleServer.pm $(INST_LIBDIR)/OID.pm + rm -f $(INST_LIBDIR)/ztest.pl $(INST_LIBDIR)/SQL.pm $(INST_LIBDIR)/OID.pm $(INST_LIBDIR)/SQL_test.pl $(INST_LIBDIR)/SimpleServer.pm rm -rf Makefile Makefile.old @@ -609,6 +618,8 @@ pure_perl_install :: $(INST_ARCHLIB) $(INSTALLARCHLIB) \ $(INST_BIN) $(INSTALLBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ + $(INST_HTMLLIBDIR) $(INSTALLHTMLPRIVLIBDIR) \ + $(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \ $(INST_MAN1DIR) $(INSTALLMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLMAN3DIR) @$(WARN_IF_OLD_PACKLIST) \ @@ -623,12 +634,15 @@ pure_site_install :: $(INST_ARCHLIB) $(INSTALLSITEARCH) \ $(INST_BIN) $(INSTALLBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ + $(INST_HTMLLIBDIR) $(INSTALLHTMLSITELIBDIR) \ + $(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \ $(INST_MAN1DIR) $(INSTALLMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLMAN3DIR) @$(WARN_IF_OLD_PACKLIST) \ $(PERL_ARCHLIB)/auto/$(FULLEXT) doc_perl_install :: + -@$(MKPATH) $(INSTALLARCHLIB) -@$(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLPRIVLIB)" \ @@ -638,6 +652,7 @@ doc_perl_install :: >> $(INSTALLARCHLIB)/perllocal.pod doc_site_install :: + -@$(MKPATH) $(INSTALLARCHLIB) -@$(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLSITELIB)" \ @@ -665,16 +680,53 @@ FORCE: # --- MakeMaker perldepend section: PERL_HDRS = \ -$(PERL_INC)/EXTERN.h $(PERL_INC)/gv.h $(PERL_INC)/pp.h \ -$(PERL_INC)/INTERN.h $(PERL_INC)/handy.h $(PERL_INC)/proto.h \ -$(PERL_INC)/XSUB.h $(PERL_INC)/hv.h $(PERL_INC)/regcomp.h \ -$(PERL_INC)/av.h $(PERL_INC)/keywords.h $(PERL_INC)/regexp.h \ -$(PERL_INC)/config.h $(PERL_INC)/mg.h $(PERL_INC)/scope.h \ -$(PERL_INC)/cop.h $(PERL_INC)/op.h $(PERL_INC)/sv.h \ -$(PERL_INC)/cv.h $(PERL_INC)/opcode.h $(PERL_INC)/unixish.h \ -$(PERL_INC)/dosish.h $(PERL_INC)/patchlevel.h $(PERL_INC)/util.h \ -$(PERL_INC)/embed.h $(PERL_INC)/perl.h $(PERL_INC)/iperlsys.h \ -$(PERL_INC)/form.h $(PERL_INC)/perly.h + $(PERL_INC)/EXTERN.h \ + $(PERL_INC)/INTERN.h \ + $(PERL_INC)/XSUB.h \ + $(PERL_INC)/av.h \ + $(PERL_INC)/cc_runtime.h \ + $(PERL_INC)/config.h \ + $(PERL_INC)/cop.h \ + $(PERL_INC)/cv.h \ + $(PERL_INC)/dosish.h \ + $(PERL_INC)/embed.h \ + $(PERL_INC)/embedvar.h \ + $(PERL_INC)/fakethr.h \ + $(PERL_INC)/form.h \ + $(PERL_INC)/gv.h \ + $(PERL_INC)/handy.h \ + $(PERL_INC)/hv.h \ + $(PERL_INC)/intrpvar.h \ + $(PERL_INC)/iperlsys.h \ + $(PERL_INC)/keywords.h \ + $(PERL_INC)/mg.h \ + $(PERL_INC)/nostdio.h \ + $(PERL_INC)/objXSUB.h \ + $(PERL_INC)/op.h \ + $(PERL_INC)/opcode.h \ + $(PERL_INC)/opnames.h \ + $(PERL_INC)/patchlevel.h \ + $(PERL_INC)/perl.h \ + $(PERL_INC)/perlapi.h \ + $(PERL_INC)/perlio.h \ + $(PERL_INC)/perlsdio.h \ + $(PERL_INC)/perlsfio.h \ + $(PERL_INC)/perlvars.h \ + $(PERL_INC)/perly.h \ + $(PERL_INC)/pp.h \ + $(PERL_INC)/pp_proto.h \ + $(PERL_INC)/proto.h \ + $(PERL_INC)/regcomp.h \ + $(PERL_INC)/regexp.h \ + $(PERL_INC)/regnodes.h \ + $(PERL_INC)/scope.h \ + $(PERL_INC)/sv.h \ + $(PERL_INC)/thrdvar.h \ + $(PERL_INC)/thread.h \ + $(PERL_INC)/unixish.h \ + $(PERL_INC)/utf8.h \ + $(PERL_INC)/util.h \ + $(PERL_INC)/warnings.h $(OBJECT) : $(PERL_HDRS) @@ -752,7 +804,7 @@ testdb_static :: pure_all $(MAP_TARGET) # --- MakeMaker ppd section: # Creates a PPD (Perl Package Description) for a binary distribution. ppd: - @$(PERL) -e "print qq{\n}. qq{\tNet-Z3950-SimpleServer\n}. qq{\t\n}. qq{\t\n}. qq{\t\n}. qq{\t\t\n}. qq{\t\t\n}. qq{\t\t\n}. qq{\t\n}. qq{\n}" > Net-Z3950-SimpleServer.ppd + @$(PERL) -e "print qq{\n}. qq{\tNet-Z3950-SimpleServer\n}. qq{\t\n}. qq{\t\n}. qq{\t\n}. qq{\t\t\n}. qq{\t\t\n}. qq{\t\t\n}. qq{\t\n}. qq{\n}" > Net-Z3950-SimpleServer.ppd # --- MakeMaker pm_to_blib section: diff --git a/SimpleServer.c b/SimpleServer.c index e22809a..fd43968 100644 --- a/SimpleServer.c +++ b/SimpleServer.c @@ -46,7 +46,9 @@ #ifdef ASN_COMPILED #include #endif - +#ifndef sv_undef /* To fix the problem with Perl 5.6.0 */ +#define sv_undef PL_sv_undef +#endif typedef struct { SV *handle; @@ -798,17 +800,17 @@ void bend_close(void *handle) } -#line 802 "SimpleServer.c" +#line 804 "SimpleServer.c" XS(XS_Net__Z3950__SimpleServer_set_init_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_init_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_init_handler(arg)"); { SV * arg = ST(0); -#line 798 "SimpleServer.xs" +#line 800 "SimpleServer.xs" init_ref = newSVsv(arg); -#line 812 "SimpleServer.c" +#line 814 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -817,12 +819,12 @@ XS(XS_Net__Z3950__SimpleServer_set_close_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_close_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_close_handler(arg)"); { SV * arg = ST(0); -#line 805 "SimpleServer.xs" +#line 807 "SimpleServer.xs" close_ref = newSVsv(arg); -#line 826 "SimpleServer.c" +#line 828 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -831,12 +833,12 @@ XS(XS_Net__Z3950__SimpleServer_set_sort_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_sort_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_sort_handler(arg)"); { SV * arg = ST(0); -#line 812 "SimpleServer.xs" +#line 814 "SimpleServer.xs" sort_ref = newSVsv(arg); -#line 840 "SimpleServer.c" +#line 842 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -845,12 +847,12 @@ XS(XS_Net__Z3950__SimpleServer_set_search_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_search_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_search_handler(arg)"); { SV * arg = ST(0); -#line 818 "SimpleServer.xs" +#line 820 "SimpleServer.xs" search_ref = newSVsv(arg); -#line 854 "SimpleServer.c" +#line 856 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -859,12 +861,12 @@ XS(XS_Net__Z3950__SimpleServer_set_fetch_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_fetch_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_fetch_handler(arg)"); { SV * arg = ST(0); -#line 825 "SimpleServer.xs" +#line 827 "SimpleServer.xs" fetch_ref = newSVsv(arg); -#line 868 "SimpleServer.c" +#line 870 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -873,12 +875,12 @@ XS(XS_Net__Z3950__SimpleServer_set_present_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_present_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_present_handler(arg)"); { SV * arg = ST(0); -#line 832 "SimpleServer.xs" +#line 834 "SimpleServer.xs" present_ref = newSVsv(arg); -#line 882 "SimpleServer.c" +#line 884 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -887,12 +889,12 @@ XS(XS_Net__Z3950__SimpleServer_set_esrequest_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_esrequest_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_esrequest_handler(arg)"); { SV * arg = ST(0); -#line 839 "SimpleServer.xs" +#line 841 "SimpleServer.xs" esrequest_ref = newSVsv(arg); -#line 896 "SimpleServer.c" +#line 898 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -901,12 +903,12 @@ XS(XS_Net__Z3950__SimpleServer_set_delete_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_delete_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_delete_handler(arg)"); { SV * arg = ST(0); -#line 846 "SimpleServer.xs" +#line 848 "SimpleServer.xs" delete_ref = newSVsv(arg); -#line 910 "SimpleServer.c" +#line 912 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -915,12 +917,12 @@ XS(XS_Net__Z3950__SimpleServer_set_scan_handler) { dXSARGS; if (items != 1) - croak("Usage: Net::Z3950::SimpleServer::set_scan_handler(arg)"); + Perl_croak(aTHX_ "Usage: Net::Z3950::SimpleServer::set_scan_handler(arg)"); { SV * arg = ST(0); -#line 853 "SimpleServer.xs" +#line 855 "SimpleServer.xs" scan_ref = newSVsv(arg); -#line 924 "SimpleServer.c" +#line 926 "SimpleServer.c" } XSRETURN_EMPTY; } @@ -929,15 +931,16 @@ XS(XS_Net__Z3950__SimpleServer_start_server) { dXSARGS; { -#line 859 "SimpleServer.xs" +#line 861 "SimpleServer.xs" char **argv; char **argv_buf; char *ptr; int i; STRLEN len; -#line 939 "SimpleServer.c" +#line 941 "SimpleServer.c" int RETVAL; -#line 865 "SimpleServer.xs" + dXSTARG; +#line 867 "SimpleServer.xs" argv_buf = (char **)xmalloc((items + 1) * sizeof(char *)); argv = argv_buf; for (i = 0; i < items; i++) @@ -949,9 +952,8 @@ XS(XS_Net__Z3950__SimpleServer_start_server) *argv_buf = NULL; RETVAL = statserv_main(items, argv, bend_init, bend_close); -#line 953 "SimpleServer.c" - ST(0) = sv_newmortal(); - sv_setiv(ST(0), (IV)RETVAL); +#line 956 "SimpleServer.c" + XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } diff --git a/SimpleServer.xs b/SimpleServer.xs index e2db79f..4c9f8a4 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -37,7 +37,9 @@ #ifdef ASN_COMPILED #include #endif - +#ifndef sv_undef /* To fix the problem with Perl 5.6.0 */ +#define sv_undef PL_sv_undef +#endif typedef struct { SV *handle; -- 1.7.10.4