Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227

Notice: Undefined variable: dir in /var/www/nfs_docroot_cache/www/magic/Super_Class.php on line 227
capi.tar : Wesley Alan Wright: Slacker; Ski God : University of Vermont

University of Vermont

Capi/0040775000077400007740000000000010260055161010124 5ustar wawwawCapi/test.pl0100755000077400007740000000470610260055153011446 0ustar wawwaw#! /usr/bin/perl ######################### We start with some black magic to print on failure. BEGIN { use FindBin qw($Bin); # use lib "$Bin/blib/lib"; use lib "$Bin/blib/arch"; use lib "$Bin"; $| = 1; # print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use Capi; use strict; our $loaded = 1; #print "ok 1\n"; ######################### End of black magic. my $family_name='Pat'; my $given_name='Smith'; my $password="xxxx"; my $server="calendar.uvm.edu" my $start='20040101T050000Z'; my $finish='20040229T050000Z'; my @proplist=("DTSTART","DURATION","CLASS","SUMMARY","DESCRIPTION"); my $psize=scalar(@proplist); # Display inputs print < q[Capi.pm] # AUTHOR => q[Wesley Alan Wright ] # DEFINE => q[] # INC => q[-I. -I/usr/local/include] # LDDLFLAGS => q[-shared -L/usr/local/lib] # LDFROM => q[/usr/local/lib/libcapi.so /usr/local/lib/libctimpexp.so /usr/local/lib/libctcalcli.so /usr/local/lib/libctgt_c.so /usr/local/lib/libctgt_cpp.so /usr/local/lib/libctcore.so /usr/local/lib/libctsis.so Capi.o] # LIBS => [q[-L/usr/local/lib -lcapi -lctimpexp -lctccli_cpp -lctcalcli -lctgt_cpp -lctgt_c -lctcore -lctsis_cpp -lctsis -lclntsh -lwtc9 -lpthread]] # NAME => q[Capi] # PREREQ_PM => { } # VERSION_FROM => q[Capi.pm] # --- MakeMaker post_initialize section: # --- MakeMaker const_config section: # These definitions are from config.sh (via /usr/lib/perl5/5.8.0/i386-linux-thread-multi/Config.pm) # They may have been overridden via Makefile.PL or on the command line AR = ar CC = gcc CCCDLFLAGS = -fPIC CCDLFLAGS = -rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE DLEXT = so DLSRC = dl_dlopen.xs LD = gcc LDDLFLAGS = -shared -L/usr/local/lib LDFLAGS = -L/usr/local/lib LIBC = /lib/libc-2.3.2.so LIB_EXT = .a OBJ_EXT = .o OSNAME = linux OSVERS = 2.4.21-23.elsmp RANLIB = : SO = so EXE_EXT = FULL_AR = /usr/bin/ar # --- MakeMaker constants section: AR_STATIC_ARGS = cr NAME = Capi DISTNAME = Capi NAME_SYM = Capi VERSION = 0.01 VERSION_SYM = 0_01 XS_VERSION = 0.01 INST_ARCHLIB = blib/arch INST_SCRIPT = blib/script INST_BIN = blib/bin INST_LIB = blib/lib INSTALLDIRS = site PREFIX = /usr SITEPREFIX = /usr VENDORPREFIX = /usr INSTALLPRIVLIB = /usr/lib/perl5/5.8.0 INSTALLSITELIB = /usr/lib/perl5/site_perl/5.8.0 INSTALLVENDORLIB = /usr/lib/perl5/vendor_perl/5.8.0 INSTALLARCHLIB = /usr/lib/perl5/5.8.0/i386-linux-thread-multi INSTALLSITEARCH = /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi INSTALLVENDORARCH = /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi INSTALLBIN = /usr/bin INSTALLSITEBIN = /usr/bin INSTALLVENDORBIN = /usr/bin INSTALLSCRIPT = /usr/bin PERL_LIB = /usr/lib/perl5/5.8.0 PERL_ARCHLIB = /usr/lib/perl5/5.8.0/i386-linux-thread-multi SITELIBEXP = /usr/lib/perl5/site_perl/5.8.0 SITEARCHEXP = /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi LIBPERL_A = libperl.a FIRST_MAKEFILE = Makefile MAKE_APERL_FILE = Makefile.aperl PERLMAINCC = $(CC) PERL_INC = /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE PERL = /usr/bin/perl FULLPERL = /usr/bin/perl PERLRUN = $(PERL) FULLPERLRUN = $(FULLPERL) PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" ABSPERL = $(PERL) ABSPERLRUN = $(ABSPERL) ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" FULL_AR = /usr/bin/ar PERL_CORE = 0 NOOP = $(SHELL) -c true NOECHO = @ 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.8.0/ExtUtils/MakeMaker.pm MM_VERSION = 6.03 # FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) # PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) # DLBASE = Basename part of dynamic library. May be just equal BASEEXT. FULLEXT = Capi BASEEXT = Capi PARENT_NAME = DLBASE = $(BASEEXT) VERSION_FROM = Capi.pm INC = -I. -I/usr/local/include DEFINE = OBJECT = $(BASEEXT)$(OBJ_EXT) LDFROM = /usr/local/lib/libcapi.so /usr/local/lib/libctimpexp.so /usr/local/lib/libctcalcli.so /usr/local/lib/libctgt_c.so /usr/local/lib/libctgt_cpp.so /usr/local/lib/libctcore.so /usr/local/lib/libctsis.so Capi.o LINKTYPE = dynamic # Handy lists of source code files: XS_FILES= Capi.xs C_FILES = Capi.c O_FILES = Capi.o H_FILES = ppport.h MAN1PODS = MAN3PODS = Capi.pm INST_MAN1DIR = blib/man1 MAN1EXT = 1 INSTALLMAN1DIR = /usr/share/man/man1 INSTALLSITEMAN1DIR = /usr/share/man/man1 INSTALLVENDORMAN1DIR = /usr/share/man/man1 INST_MAN3DIR = blib/man3 MAN3EXT = 3pm INSTALLMAN3DIR = /usr/share/man/man3 INSTALLSITEMAN3DIR = /usr/share/man/man3 INSTALLVENDORMAN3DIR = /usr/share/man/man3 PERM_RW = 644 PERM_RWX = 755 # work around a famous dec-osf make(1) feature(?): makemakerdflt: all .SUFFIXES: .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) # Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that # some make implementations will delete the Makefile when we rebuild it. Because # we call false(1) when we rebuild it. So make(1) is not completely wrong when it # does so. Our milage may vary. # .PRECIOUS: Makefile # seems to be not necessary anymore .PHONY: all config static dynamic test linkext manifest # Where is the Config information that we are using/depend on CONFIGDEP = $(PERL_ARCHLIB)/Config.pm $(PERL_INC)/config.h # Where to put things: INST_LIBDIR = $(INST_LIB) INST_ARCHLIBDIR = $(INST_ARCHLIB) INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) INST_STATIC = $(INST_ARCHAUTODIR)/$(BASEEXT)$(LIB_EXT) INST_DYNAMIC = $(INST_ARCHAUTODIR)/$(DLBASE).$(DLEXT) INST_BOOT = $(INST_ARCHAUTODIR)/$(BASEEXT).bs EXPORT_LIST = PERL_ARCHIVE = PERL_ARCHIVE_AFTER = TO_INST_PM = Capi.pm PM_TO_BLIB = Capi.pm \ blib/lib/Capi.pm # --- MakeMaker tool_autosplit section: # Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto AUTOSPLITFILE = $(PERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1) ;' # --- MakeMaker tool_xsubpp section: XSUBPPDIR = /usr/lib/perl5/5.8.0/ExtUtils XSUBPP = $(XSUBPPDIR)/xsubpp XSPROTOARG = XSUBPPDEPS = $(XSUBPPDIR)/typemap $(XSUBPP) XSUBPPARGS = -typemap $(XSUBPPDIR)/typemap XSUBPP_EXTRA_ARGS = # --- MakeMaker tools_other section: SHELL = /bin/sh CHMOD = chmod CP = cp LD = gcc MV = mv NOOP = $(SHELL) -c true RM_F = rm -f RM_RF = rm -rf TEST_F = test -f TOUCH = touch UMASK_NULL = umask 0 DEV_NULL = > /dev/null 2>&1 # The following is a portable way to say mkdir -p # To see which directories are created, change the if 0 to if 1 MKPATH = $(PERLRUN) "-MExtUtils::Command" -e mkpath # This helps us to minimize the effect of the .exists files A yet # better solution would be to have a stable file in the perl # distribution with a timestamp of zero. But this solution doesn't # need any changes to the core distribution and works with older perls EQUALIZE_TIMESTAMP = $(PERLRUN) "-MExtUtils::Command" -e eqtime # Here we warn users that an old packlist file was found somewhere, # and that they should call some uninstall routine WARN_IF_OLD_PACKLIST = $(PERL) -we 'exit unless -f $$ARGV[0];' \ -e 'print "WARNING: I have found an old package in\n";' \ -e 'print "\t$$ARGV[0].\n";' \ -e 'print "Please make sure the two installations are not conflicting\n";' UNINST=0 VERBINST=0 MOD_INSTALL = $(PERL) "-I$(INST_LIB)" "-I$(PERL_LIB)" "-MExtUtils::Install" \ -e "install({@ARGV},'$(VERBINST)',0,'$(UNINST)');" DOC_INSTALL = $(PERL) -e '$$\="\n\n";' \ -e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", $$arg=shift, "|", $$arg, ">";' \ -e 'print "=over 4";' \ -e 'while (defined($$key = shift) and defined($$val = shift)){print "=item *";print "C<$$key: $$val>";}' \ -e 'print "=back";' UNINSTALL = $(PERLRUN) "-MExtUtils::Install" \ -e 'uninstall($$ARGV[0],1,1); print "\nUninstall is deprecated. Please check the";' \ -e 'print " packlist above carefully.\n There may be errors. Remove the";' \ -e 'print " appropriate files manually.\n Sorry for the inconveniences.\n"' # --- MakeMaker dist section: ZIPFLAGS = -r TO_UNIX = @$(NOOP) TAR = tar POSTOP = @$(NOOP) ZIP = zip DIST_DEFAULT = tardist CI = ci -u SHAR = shar COMPRESS = gzip --best DIST_CP = best PREOP = @$(NOOP) TARFLAGS = cvf DISTVNAME = $(DISTNAME)-$(VERSION) SUFFIX = .gz RCS_LABEL = rcs -Nv$(VERSION_SYM): -q # --- MakeMaker macro section: # --- MakeMaker depend section: # --- MakeMaker cflags section: CCFLAGS = -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm OPTIMIZE = -O2 -g -pipe -march=i386 -mcpu=i686 PERLTYPE = MPOLLUTE = # --- MakeMaker const_loadlibs section: # Capi might depend on some other libraries: # See ExtUtils::Liblist for details # EXTRALIBS = -L/usr/local/lib -lcapi -lctimpexp -lctccli_cpp -lctcalcli -lctgt_cpp -lctgt_c -lctcore -lctsis_cpp -lctsis -lclntsh -lwtc9 -lpthread LDLOADLIBS = -L/usr/local/lib -lcapi -lctimpexp -lctccli_cpp -lctcalcli -lctgt_cpp -lctgt_c -lctcore -lctsis_cpp -lctsis -lclntsh -lwtc9 -lpthread BSLOADLIBS = LD_RUN_PATH = /usr/local/lib:/lib # --- MakeMaker const_cccmd section: CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \ $(CCFLAGS) $(OPTIMIZE) \ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) # --- MakeMaker post_constants section: # --- MakeMaker pasthru section: PASTHRU = LIB="$(LIB)"\ LIBPERL_A="$(LIBPERL_A)"\ LINKTYPE="$(LINKTYPE)"\ PREFIX="$(PREFIX)"\ OPTIMIZE="$(OPTIMIZE)"\ PASTHRU_DEFINE="$(PASTHRU_DEFINE)"\ PASTHRU_INC="$(PASTHRU_INC)" # --- MakeMaker c_o section: .c.i: gcc -E -c $(PASTHRU_INC) $(INC) \ $(CCFLAGS) $(OPTIMIZE) \ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i .c.s: $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c .c$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c .C$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C .cpp$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp .cxx$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx .cc$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc # --- MakeMaker xs_c section: .xs.c: $(PERLRUN) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c # --- MakeMaker xs_o section: .xs$(OBJ_EXT): $(PERLRUN) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c # --- MakeMaker top_targets section: all :: pure_all manifypods @$(NOOP) pure_all :: config pm_to_blib subdirs linkext @$(NOOP) subdirs :: $(MYEXTLIB) @$(NOOP) config :: Makefile $(INST_LIBDIR)/.exists @$(NOOP) config :: $(INST_ARCHAUTODIR)/.exists @$(NOOP) config :: $(INST_AUTODIR)/.exists @$(NOOP) $(INST_AUTODIR)/.exists :: /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h @$(MKPATH) $(INST_AUTODIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h $(INST_AUTODIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_AUTODIR) $(INST_LIBDIR)/.exists :: /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h @$(MKPATH) $(INST_LIBDIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h $(INST_LIBDIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_LIBDIR) $(INST_ARCHAUTODIR)/.exists :: /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h @$(MKPATH) $(INST_ARCHAUTODIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h $(INST_ARCHAUTODIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR) config :: $(INST_MAN3DIR)/.exists @$(NOOP) $(INST_MAN3DIR)/.exists :: /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h @$(MKPATH) $(INST_MAN3DIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h $(INST_MAN3DIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_MAN3DIR) $(O_FILES): $(H_FILES) help: perldoc ExtUtils::MakeMaker # --- MakeMaker linkext section: linkext :: $(LINKTYPE) @$(NOOP) # --- MakeMaker dlsyms section: # --- MakeMaker dynamic section: ## $(INST_PM) has been moved to the all: target. ## It remains here for awhile to allow for old usage: "make dynamic" #dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM) dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT) @$(NOOP) # --- MakeMaker dynamic_bs section: BOOTSTRAP = Capi.bs # As Mkbootstrap might not write a file (if none is required) # we use touch to prevent make continually trying to remake it. # The DynaLoader only reads a non-empty file. $(BOOTSTRAP): Makefile $(INST_ARCHAUTODIR)/.exists @echo "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))" @$(PERLRUN) \ "-MExtUtils::Mkbootstrap" \ -e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');" @$(TOUCH) $(BOOTSTRAP) $(CHMOD) $(PERM_RW) $@ $(INST_BOOT): $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists @rm -rf $(INST_BOOT) -cp $(BOOTSTRAP) $(INST_BOOT) $(CHMOD) $(PERM_RW) $@ # --- MakeMaker dynamic_lib section: # This section creates the dynamically loadable $(INST_DYNAMIC) # from $(OBJECT) and possibly $(MYEXTLIB). ARMAYBE = : OTHERLDFLAGS = INST_DYNAMIC_DEP = $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP) $(RM_F) $@ LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) $(CHMOD) $(PERM_RWX) $@ # --- MakeMaker static section: ## $(INST_PM) has been moved to the all: target. ## It remains here for awhile to allow for old usage: "make static" #static :: Makefile $(INST_STATIC) $(INST_PM) static :: Makefile $(INST_STATIC) @$(NOOP) # --- MakeMaker static_lib section: $(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)/.exists $(RM_RF) $@ $(FULL_AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@ $(CHMOD) $(PERM_RWX) $@ @echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld # --- MakeMaker manifypods section: POD2MAN_EXE = /usr/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";' \ -e 'system(q[$(PERLRUN) $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\047t install $$m{$$_}\n";' \ -e 'chmod(oct($(PERM_RW)), $$m{$$_}) or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}' manifypods : pure_all Capi.pm @$(POD2MAN) \ Capi.pm \ $(INST_MAN3DIR)/Capi.$(MAN3EXT) # --- MakeMaker processPL section: # --- MakeMaker installbin section: # --- MakeMaker subdirs section: # none # --- MakeMaker clean section: # Delete temporary files but do not touch installed files. We don't delete # the Makefile here so a later make realclean still has a makefile to use. clean :: -rm -rf Capi.c ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core core.*perl.*.? *perl.core -mv Makefile Makefile.old $(DEV_NULL) # --- MakeMaker realclean section: # Delete temporary files (via clean) and also delete installed files realclean purge :: clean rm -rf $(INST_AUTODIR) $(INST_ARCHAUTODIR) rm -rf $(DISTVNAME) rm -f $(INST_DYNAMIC) $(INST_BOOT) rm -f $(INST_STATIC) rm -f blib/lib/Capi.pm rm -rf Makefile Makefile.old # --- MakeMaker dist_basics section: distclean :: realclean distcheck $(NOECHO) $(NOOP) distcheck : $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck skipcheck : $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck manifest : $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest veryclean : realclean $(RM_F) *~ *.orig */*~ */*.orig # --- MakeMaker dist_core section: dist : $(DIST_DEFAULT) @$(PERL) -le 'print "Warning: Makefile possibly out of date with $$vf" if ' \ -e '-e ($$vf="$(VERSION_FROM)") and -M $$vf < -M "Makefile";' tardist : $(DISTVNAME).tar$(SUFFIX) zipdist : $(DISTVNAME).zip $(DISTVNAME).tar$(SUFFIX) : distdir $(PREOP) $(TO_UNIX) $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) $(RM_RF) $(DISTVNAME) $(COMPRESS) $(DISTVNAME).tar $(POSTOP) $(DISTVNAME).zip : distdir $(PREOP) $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) $(RM_RF) $(DISTVNAME) $(POSTOP) uutardist : $(DISTVNAME).tar$(SUFFIX) uuencode $(DISTVNAME).tar$(SUFFIX) \ $(DISTVNAME).tar$(SUFFIX) > \ $(DISTVNAME).tar$(SUFFIX)_uu shdist : distdir $(PREOP) $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar $(RM_RF) $(DISTVNAME) $(POSTOP) # --- MakeMaker dist_dir section: distdir : $(RM_RF) $(DISTVNAME) $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" # --- MakeMaker dist_test section: disttest : distdir cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL cd $(DISTVNAME) && $(MAKE) $(PASTHRU) cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) # --- MakeMaker dist_ci section: ci : $(PERLRUN) "-MExtUtils::Manifest=maniread" \ -e "@all = keys %{ maniread() };" \ -e 'print("Executing $(CI) @all\n"); system("$(CI) @all");' \ -e 'print("Executing $(RCS_LABEL) ...\n"); system("$(RCS_LABEL) @all");' # --- MakeMaker install section: install :: all pure_install doc_install install_perl :: all pure_perl_install doc_perl_install install_site :: all pure_site_install doc_site_install install_vendor :: all pure_vendor_install doc_vendor_install pure_install :: pure_$(INSTALLDIRS)_install doc_install :: doc_$(INSTALLDIRS)_install @echo Appending installation info to $(INSTALLARCHLIB)/perllocal.pod pure__install : pure_site_install @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site doc__install : doc_site_install @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site pure_perl_install :: @$(MOD_INSTALL) \ read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ write $(INSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(INSTALLPRIVLIB) \ $(INST_ARCHLIB) $(INSTALLARCHLIB) \ $(INST_BIN) $(INSTALLBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ $(INST_MAN1DIR) $(INSTALLMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLMAN3DIR) @$(WARN_IF_OLD_PACKLIST) \ $(SITEARCHEXP)/auto/$(FULLEXT) pure_site_install :: @$(MOD_INSTALL) \ read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ write $(INSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(INSTALLSITELIB) \ $(INST_ARCHLIB) $(INSTALLSITEARCH) \ $(INST_BIN) $(INSTALLSITEBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ $(INST_MAN1DIR) $(INSTALLSITEMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLSITEMAN3DIR) @$(WARN_IF_OLD_PACKLIST) \ $(PERL_ARCHLIB)/auto/$(FULLEXT) pure_vendor_install :: @$(MOD_INSTALL) \ $(INST_LIB) $(INSTALLVENDORLIB) \ $(INST_ARCHLIB) $(INSTALLVENDORARCH) \ $(INST_BIN) $(INSTALLVENDORBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ $(INST_MAN1DIR) $(INSTALLVENDORMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLVENDORMAN3DIR) doc_perl_install :: -@$(MKPATH) $(INSTALLARCHLIB) -@$(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLPRIVLIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(INSTALLARCHLIB)/perllocal.pod doc_site_install :: -@$(MKPATH) $(INSTALLARCHLIB) -@$(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLSITELIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(INSTALLSITEARCH)/perllocal.pod doc_vendor_install :: uninstall :: uninstall_from_$(INSTALLDIRS)dirs uninstall_from_perldirs :: @$(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist uninstall_from_sitedirs :: @$(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist # --- MakeMaker force section: # Phony target to force checking subdirectories. FORCE: @$(NOOP) # --- MakeMaker perldepend section: PERL_HDRS = \ $(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)/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) Capi.c : $(XSUBPPDEPS) # --- MakeMaker makefile section: $(OBJECT) : $(FIRST_MAKEFILE) # We take a very conservative approach here, but it\'s worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. Makefile : Makefile.PL $(CONFIGDEP) @echo "Makefile out-of-date with respect to $?" @echo "Cleaning current config before rebuilding Makefile..." -@$(RM_F) Makefile.old -@$(MV) Makefile Makefile.old -$(MAKE) -f Makefile.old clean $(DEV_NULL) || $(NOOP) $(PERLRUN) Makefile.PL @echo "==> Your Makefile has been rebuilt. <==" @echo "==> Please rerun the make command. <==" false # --- MakeMaker staticmake section: # --- MakeMaker makeaperl section --- MAP_TARGET = perl FULLPERL = /usr/bin/perl $(MAP_TARGET) :: static $(MAKE_APERL_FILE) $(MAKE) -f $(MAKE_APERL_FILE) $@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) @echo Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) @$(PERLRUNINST) \ Makefile.PL DIR= \ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= # --- MakeMaker test section: TEST_VERBOSE=0 TEST_TYPE=test_$(LINKTYPE) TEST_FILE = test.pl TEST_FILES = t/*.t TESTDB_SW = -d testdb :: testdb_$(LINKTYPE) test :: $(TEST_TYPE) test_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) testdb_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) test_ : test_dynamic test_static :: pure_all $(MAP_TARGET) PERL_DL_NONLAZY=1 ./$(MAP_TARGET) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) testdb_static :: pure_all $(MAP_TARGET) PERL_DL_NONLAZY=1 ./$(MAP_TARGET) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) # --- MakeMaker ppd section: # Creates a PPD (Perl Package Description) for a binary distribution. ppd: @$(PERL) -e "print qq{\n\t$(DISTNAME)\n\tPerl extension for Oracle Calendar Server Access\n\tWesley Alan Wright <waw\@uvm.edu>\n}" > $(DISTNAME).ppd @$(PERL) -e "print qq{\t\n}" >> $(DISTNAME).ppd @$(PERL) -e "print qq{\t\t\n\t\t\n\t\t\n\t\n\n}" >> $(DISTNAME).ppd # --- MakeMaker pm_to_blib section: pm_to_blib: $(TO_INST_PM) @$(PERLRUNINST) "-MExtUtils::Install" \ -e "pm_to_blib({qw{Capi.pm blib/lib/Capi.pm}},'$(INST_LIB)/auto','$(PM_FILTER)')" @$(TOUCH) $@ # --- MakeMaker selfdocument section: # --- MakeMaker postamble section: # End. Capi/Capi.xs0100644000077400007740000001026310260056017011352 0ustar wawwaw#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include MODULE = Capi PACKAGE = Capi PROTOTYPES: ENABLE int Logon(login_familyname,login_givename, password, host, node, session) char *login_familyname char *login_givename char *password char *host char *node void *session PREINIT: char user_loginStr[100] = "?/S="; /* formatted login string. */ CODE: /* Get the login string in the proper format */ strcat(user_loginStr, login_familyname); strcat(user_loginStr, "/G="); strcat(user_loginStr, login_givename); strcat(user_loginStr, "/ND="); strcat(user_loginStr, node); strcat(user_loginStr, "/"); session=NULL; RETVAL=CAPI_Logon(user_loginStr, password, host, 0, &session); OUTPUT: RETVAL session int Logoff (session) void* session CODE: RETVAL = CAPI_Logoff(&session, 0); OUTPUT: RETVAL char * FetchEventsByRange(session, d_start, d_end, status, nprops, nhandles, ...) void *session char *d_start char *d_end unsigned long status int nprops int nhandles PREINIT: CAPIStatus status1,status2; CAPIStream stream; const char * sBuf = NULL; CAPIStatus slist[50]; CAPIHandle handles[50]; const char * handle_name; const char * propList[20]; int npropList,i,nhand; const char * errString= NULL; CODE: for (npropList=0; npropList\n",npropList,propList[npropList]); */ } for (nhand=0; nhand\n",nhand,handles[nhand]); status = CAPI_HandleInfo(session, handles[nhand], CAPI_HANDLE_NAME, &handle_name); printf("status %x handle_name %s
\n",status, handle_name); */ } stream=NULL; /* status1 = CAPI_CreateCallbackStream(session,&stream,NULL,NULL,receiveData,&myCtx,0); */ status1 = CAPI_CreateMemoryStream(session,&stream,NULL, &sBuf,0); /* printf("status1 CAPI_CreateMemoryStream%x
\n",status1); */ status2 = CAPI_FetchEventsByRange(session, handles, nhandles, slist, 0, d_start,d_end, propList, nprops, stream ); /* CAPI_GetStatusString( status2, &errString); printf(" CAPI_GetStatusString from fetch=%s
\n", errString); printf("status2 CAPI_FetchEventsByRange %x %x %x
\n",status2,slist[0],CAPI_STAT_SECUR_READ_PROPS); printf("

sbuf %s

\n",sBuf); printf("

stream %s

\n",stream);*/ RETVAL=(char *) sBuf; status=status2; OUTPUT: RETVAL status char * CAPI_GetStatusString(s) int s PREINIT: const char * errString= NULL; CODE: /* printf(" CAPI_GetStatusString s=%d
\n",s); */ CAPI_GetStatusString(s, &errString); /* printf(" CAPI_GetStatusString e=%s
\n", errString); */ RETVAL= (char *) errString; OUTPUT: RETVAL int GetHandle (session, agenda_familyname, agenda_givenname, handle) void *session char *agenda_familyname char *agenda_givenname void *handle PREINIT: /* 02-23-2004 mlm change string seperator from / to vertical tab \v */ char u[100] = "?\vS="; /* formatted login string. */ CODE: /* Get the login string in the proper format */ strcat(u, agenda_familyname); strcat(u, "\v"); if (strlen(agenda_givenname) > 0) { strcat(u, "G="); strcat(u, agenda_givenname); strcat(u, "\v"); } handle=NULL; RETVAL=CAPI_GetHandle(session, u, 0, &handle); OUTPUT: RETVAL handle int GetRHandle (session, agenda_resourcename, handle) void *session char *agenda_resourcename void *handle PREINIT: /* 02-23-2004 mlm change string seperator from / to vertical tab \v */ char u[100] = "?\vRS="; /* formatted login string. */ CODE: /* Get the login string in the proper format */ strcat(u, agenda_resourcename); strcat(u, "\v"); handle=NULL; RETVAL=CAPI_GetHandle(session, u, 0, &handle); OUTPUT: RETVAL handle int CAPI_STAT_OK() CODE: RETVAL= CAPI_STAT_OK; OUTPUT: RETVAL int CAPI_STAT_SECUR_READ_PROPS() CODE: RETVAL= CAPI_STAT_SECUR_READ_PROPS; OUTPUT: RETVAL Capi/Makefile.PL0100644000077400007740000000313110260054215012066 0ustar wawwawuse 5.008; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'Capi', VERSION_FROM => 'Capi.pm', # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.2 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'Capi.pm', # retrieve abstract from module AUTHOR => 'Wesley Alan Wright ') : ()), # This LIBS specification was used with AIX # LIBS => ['-L/usr/local/lib'], # This LIBS specification was used with Linux LIBS => ['-L/usr/local/lib -lcapi -lctimpexp -lctccli_cpp -lctcalcli -lctgt_cpp -lctgt_c -lctcore -lctsis_cpp -lctsis -lclntsh -lwtc9 -lpthread'], # e.g., '-lm' # This LDDLFLAGS specification was used with AIX # LDDLFLAGS => '-Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:/opt/freeware/lib/perl5/5.8.2/ppc-aix/CORE/perl.exp -Wl,-bE:Capi.exp -Wl,-bnoentry -lc -L/usr/local/lib -L/usr/local/lib', # This LDDLFLAGS specification was used with Linux LDDLFLAGS => '-shared -L/usr/local/lib', DEFINE => '', # e.g., '-DHAVE_SOMETHING' INC => '-I. -I/usr/local/include', # Un-comment this if you add C files to link with later: # OBJECT => '$(O_FILES)', # link all the C files too LDFROM => '/usr/local/lib/libcapi.so /usr/local/lib/libctimpexp.so /usr/local/lib/libctcalcli.so /usr/local/lib/libctgt_c.so /usr/local/lib/libctgt_cpp.so /usr/local/lib/libctcore.so /usr/local/lib/libctsis.so Capi.o' ); Capi/Changes0100644000077400007740000000055310260050621011411 0ustar wawwawRevision history for Perl extension Capi2. 0.2 Mon May 23 15:47:58 2005 - original version; created by h2xs 1.22 with options -A -n Mytest Ported to Redhat Linux ES 0.1 Wed Jan 21 10:08:34 2004 - original version; created by h2xs 1.23 with options -AOn Capi2 ./Capi2/Capi-2.5.2/inc/ctapi.h developed using AIXCapi/Capi.pm0100664000077400007740000000554510260053266011350 0ustar wawwawpackage Capi; use 5.008; use strict; use warnings; require Exporter; our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use Capi2 ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.01'; require XSLoader; XSLoader::load('Capi', $VERSION); # Preloaded methods go here. 1; __END__ # Below is stub documentation for your module. You'd better edit it! =head1 NAME Capi - Perl extension for Oracle Calendar Server Access =head1 SYNOPSIS use Capi; my $session; my $status=Capi::Logon("Calendar", "Campus", "xxxxxx", "calendar.myu.edu", "0", $session); if ($status != Capi::CAPI_STAT_OK) { print "Error - could not log in. Status=$status ".Capi::CAPI_GetStatusString($status)."\n"; exit; } my @proplist=("DTSTART","DURATION","CLASS","STATUS","LOCATION","SUMMARY","DESCRIPTION"); $status=Capi::GetRHandle($session,$family_name,$handle); $status=Capi::GetHandle($session,$family_name,$given_name,$handle); $stream=Capi::FetchEventsByRange($session, $start,$finish,$status,$psize,$agendacount,@proplist,@handles); $status=Capi::Logoff($session); =head1 ABSTRACT perl Interface to Oracle CAPI (Calendar API) for Oracle Calendar Requires Oracle Calendar SDK =head1 DESCRIPTION Capi perl interface supports the following functions: Capi::Logon (calendar user surname,calendar user given name, calendar user password, server address, returned session ID) Capi::GetRHandle (session ID, resource name, returned handle ID) Capi::GetHandle (session ID, calendar user surname, calendar user given name, returned handle ID) Capi::FetchEventsByRange (session id, start as UTC, end as UTC, returned status, number of agendas, list of properties to return, array of handles) Capi::Logoff (session ID) o Logon using any valid Calendar user credentials. o Get a handle for each resource and/or calendar user . You can the pass an array of handles to FetchEventsByRange to get back a single stream containing events from each handle o FetchEventsByRange range specified in UTC ; e.h., 20040218T200000Z (February 18 2004 20:00:00 GMT) Returned stream is in iCal format. =head2 EXPORT None by default. =head1 SEE ALSO Coordinated Universal Time http://en.wikipedia.org/wiki/Coordinated_Universal_Time iCal format http://www.ietf.org/rfc/rfc2445.txt =head1 AUTHOR Wesley A Wright, Ewaw@uvm.eduE =head1 COPYRIGHT AND LICENSE Copyright (C) 2005 by Wesley A Wright This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Capi/README0100644000077400007740000000102510260054322010773 0ustar wawwawCapi version 0.1 ================== INSTALLATION To install this module type the following: perl Makefile.PL make make install DEPENDENCIES This module requires these other modules and libraries: libcapi.so from Oracle Calendar install disk COPYRIGHT AND LICENCE Copyright (C) 2005 by Wesley Alan Wright This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available. Capi/ppport.h0100644000077400007740000003574310244431705011634 0ustar wawwaw /* ppport.h -- Perl/Pollution/Portability Version 2.0002 * * Automatically Created by Devel::PPPort on Mon May 23 15:47:58 2005 * * Do NOT edit this file directly! -- Edit PPPort.pm instead. * * Version 2.x, Copyright (C) 2001, Paul Marquess. * Version 1.x, Copyright (C) 1999, Kenneth Albanowski. * This code may be used and distributed under the same license as any * version of Perl. * * This version of ppport.h is designed to support operation with Perl * installations back to 5.004, and has been tested up to 5.8.0. * * If this version of ppport.h is failing during the compilation of this * module, please check if a newer version of Devel::PPPort is available * on CPAN before sending a bug report. * * If you are using the latest version of Devel::PPPort and it is failing * during compilation of this module, please send a report to perlbug@perl.com * * Include all following information: * * 1. The complete output from running "perl -V" * * 2. This file. * * 3. The name & version of the module you were trying to build. * * 4. A full log of the build that failed. * * 5. Any other information that you think could be relevant. * * * For the latest version of this code, please retreive the Devel::PPPort * module from CPAN. * */ /* * In order for a Perl extension module to be as portable as possible * across differing versions of Perl itself, certain steps need to be taken. * Including this header is the first major one, then using dTHR is all the * appropriate places and using a PL_ prefix to refer to global Perl * variables is the second. * */ /* If you use one of a few functions that were not present in earlier * versions of Perl, please add a define before the inclusion of ppport.h * for a static include, or use the GLOBAL request in a single module to * produce a global definition that can be referenced from the other * modules. * * Function: Static define: Extern define: * newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL * */ /* To verify whether ppport.h is needed for your module, and whether any * special defines should be used, ppport.h can be run through Perl to check * your source code. Simply say: * * perl -x ppport.h *.c *.h *.xs foo/bar*.c [etc] * * The result will be a list of patches suggesting changes that should at * least be acceptable, if not necessarily the most efficient solution, or a * fix for all possible problems. It won't catch where dTHR is needed, and * doesn't attempt to account for global macro or function definitions, * nested includes, typemaps, etc. * * In order to test for the need of dTHR, please try your module under a * recent version of Perl that has threading compiled-in. * */ /* #!/usr/bin/perl @ARGV = ("*.xs") if !@ARGV; %badmacros = %funcs = %macros = (); $replace = 0; foreach () { $funcs{$1} = 1 if /Provide:\s+(\S+)/; $macros{$1} = 1 if /^#\s*define\s+([a-zA-Z0-9_]+)/; $replace = $1 if /Replace:\s+(\d+)/; $badmacros{$2}=$1 if $replace and /^#\s*define\s+([a-zA-Z0-9_]+).*?\s+([a-zA-Z0-9_]+)/; $badmacros{$1}=$2 if /Replace (\S+) with (\S+)/; } foreach $filename (map(glob($_),@ARGV)) { unless (open(IN, "<$filename")) { warn "Unable to read from $file: $!\n"; next; } print "Scanning $filename...\n"; $c = ""; while () { $c .= $_; } close(IN); $need_include = 0; %add_func = (); $changes = 0; $has_include = ($c =~ /#.*include.*ppport/m); foreach $func (keys %funcs) { if ($c =~ /#.*define.*\bNEED_$func(_GLOBAL)?\b/m) { if ($c !~ /\b$func\b/m) { print "If $func isn't needed, you don't need to request it.\n" if $changes += ($c =~ s/^.*#.*define.*\bNEED_$func\b.*\n//m); } else { print "Uses $func\n"; $need_include = 1; } } else { if ($c =~ /\b$func\b/m) { $add_func{$func} =1 ; print "Uses $func\n"; $need_include = 1; } } } if (not $need_include) { foreach $macro (keys %macros) { if ($c =~ /\b$macro\b/m) { print "Uses $macro\n"; $need_include = 1; } } } foreach $badmacro (keys %badmacros) { if ($c =~ /\b$badmacro\b/m) { $changes += ($c =~ s/\b$badmacro\b/$badmacros{$badmacro}/gm); print "Uses $badmacros{$badmacro} (instead of $badmacro)\n"; $need_include = 1; } } if (scalar(keys %add_func) or $need_include != $has_include) { if (!$has_include) { $inc = join('',map("#define NEED_$_\n", sort keys %add_func)). "#include \"ppport.h\"\n"; $c = "$inc$c" unless $c =~ s/#.*include.*XSUB.*\n/$&$inc/m; } elsif (keys %add_func) { $inc = join('',map("#define NEED_$_\n", sort keys %add_func)); $c = "$inc$c" unless $c =~ s/^.*#.*include.*ppport.*$/$inc$&/m; } if (!$need_include) { print "Doesn't seem to need ppport.h.\n"; $c =~ s/^.*#.*include.*ppport.*\n//m; } $changes++; } if ($changes) { open(OUT,">/tmp/ppport.h.$$"); print OUT $c; close(OUT); open(DIFF, "diff -u $filename /tmp/ppport.h.$$|"); while () { s!/tmp/ppport\.h\.$$!$filename.patched!; print STDOUT; } close(DIFF); unlink("/tmp/ppport.h.$$"); } else { print "Looks OK\n"; } } __DATA__ */ #ifndef _P_P_PORTABILITY_H_ #define _P_P_PORTABILITY_H_ #ifndef PERL_REVISION # ifndef __PATCHLEVEL_H_INCLUDED__ # include "patchlevel.h" # endif # ifndef PERL_REVISION # define PERL_REVISION (5) /* Replace: 1 */ # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION /* Replace PERL_PATCHLEVEL with PERL_VERSION */ /* Replace: 0 */ # endif #endif #define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION) /* It is very unlikely that anyone will try to use this with Perl 6 (or greater), but who knows. */ #if PERL_REVISION != 5 # error ppport.h only works with Perl version 5 #endif /* PERL_REVISION != 5 */ #ifndef ERRSV # define ERRSV perl_get_sv("@",FALSE) #endif #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)) /* Replace: 1 */ # define PL_Sv Sv # define PL_compiling compiling # define PL_copline copline # define PL_curcop curcop # define PL_curstash curstash # define PL_defgv defgv # define PL_dirty dirty # define PL_dowarn dowarn # define PL_hints hints # define PL_na na # define PL_perldb perldb # define PL_rsfp_filters rsfp_filters # define PL_rsfpv rsfp # define PL_stdingv stdingv # define PL_sv_no sv_no # define PL_sv_undef sv_undef # define PL_sv_yes sv_yes /* Replace: 0 */ #endif #ifdef HASATTRIBUTE # if defined(__GNUC__) && defined(__cplusplus) # define PERL_UNUSED_DECL # else # define PERL_UNUSED_DECL __attribute__((unused)) # endif #else # define PERL_UNUSED_DECL #endif #ifndef dNOOP # define NOOP (void)0 # define dNOOP extern int Perl___notused PERL_UNUSED_DECL #endif #ifndef dTHR # define dTHR dNOOP #endif #ifndef dTHX # define dTHX dNOOP # define dTHXa(x) dNOOP # define dTHXoa(x) dNOOP #endif #ifndef pTHX # define pTHX void # define pTHX_ # define aTHX # define aTHX_ #endif /* IV could also be a quad (say, a long long), but Perls * capable of those should have IVSIZE already. */ #if !defined(IVSIZE) && defined(LONGSIZE) # define IVSIZE LONGSIZE #endif #ifndef IVSIZE # define IVSIZE 4 /* A bold guess, but the best we can make. */ #endif #ifndef UVSIZE # define UVSIZE IVSIZE #endif #ifndef NVTYPE # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) # define NVTYPE long double # else # define NVTYPE double # endif typedef NVTYPE NV; #endif #ifndef INT2PTR #if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) #else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) #endif #define NUM2PTR(any,d) (any)(PTRV)(d) #define PTR2IV(p) INT2PTR(IV,p) #define PTR2UV(p) INT2PTR(UV,p) #define PTR2NV(p) NUM2PTR(NV,p) #if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) #else # define PTR2ul(p) INT2PTR(unsigned long,p) #endif #endif /* !INT2PTR */ #ifndef boolSV # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) #endif #ifndef gv_stashpvn # define gv_stashpvn(str,len,flags) gv_stashpv(str,flags) #endif #ifndef newSVpvn # define newSVpvn(data,len) ((len) ? newSVpv ((data), (len)) : newSVpv ("", 0)) #endif #ifndef newRV_inc /* Replace: 1 */ # define newRV_inc(sv) newRV(sv) /* Replace: 0 */ #endif /* DEFSV appears first in 5.004_56 */ #ifndef DEFSV # define DEFSV GvSV(PL_defgv) #endif #ifndef SAVE_DEFSV # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) #endif #ifndef newRV_noinc # ifdef __GNUC__ # define newRV_noinc(sv) \ ({ \ SV *nsv = (SV*)newRV(sv); \ SvREFCNT_dec(sv); \ nsv; \ }) # else # if defined(USE_THREADS) static SV * newRV_noinc (SV * sv) { SV *nsv = (SV*)newRV(sv); SvREFCNT_dec(sv); return nsv; } # else # define newRV_noinc(sv) \ (PL_Sv=(SV*)newRV(sv), SvREFCNT_dec(sv), (SV*)PL_Sv) # endif # endif #endif /* Provide: newCONSTSUB */ /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63)) #if defined(NEED_newCONSTSUB) static #else extern void newCONSTSUB(HV * stash, char * name, SV *sv); #endif #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL) void newCONSTSUB(stash,name,sv) HV *stash; char *name; SV *sv; { U32 oldhints = PL_hints; HV *old_cop_stash = PL_curcop->cop_stash; HV *old_curstash = PL_curstash; line_t oldline = PL_curcop->cop_line; PL_curcop->cop_line = PL_copline; PL_hints &= ~HINT_BLOCK_SCOPE; if (stash) PL_curstash = PL_curcop->cop_stash = stash; newSUB( #if (PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22)) /* before 5.003_22 */ start_subparse(), #else # if (PERL_VERSION == 3) && (PERL_SUBVERSION == 22) /* 5.003_22 */ start_subparse(0), # else /* 5.003_23 onwards */ start_subparse(FALSE, 0), # endif #endif newSVOP(OP_CONST, 0, newSVpv(name,0)), newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) ); PL_hints = oldhints; PL_curcop->cop_stash = old_cop_stash; PL_curstash = old_curstash; PL_curcop->cop_line = oldline; } #endif #endif /* newCONSTSUB */ #ifndef START_MY_CXT /* * Boilerplate macros for initializing and accessing interpreter-local * data from C. All statics in extensions should be reworked to use * this, if you want to make the extension thread-safe. See ext/re/re.xs * for an example of the use of these macros. * * Code that uses these macros is responsible for the following: * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" * 2. Declare a typedef named my_cxt_t that is a structure that contains * all the data that needs to be interpreter-local. * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. * 4. Use the MY_CXT_INIT macro such that it is called exactly once * (typically put in the BOOT: section). * 5. Use the members of the my_cxt_t structure everywhere as * MY_CXT.member. * 6. Use the dMY_CXT macro (a declaration) in all the functions that * access MY_CXT. */ #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT) /* This must appear in all extensions that define a my_cxt_t structure, * right after the definition (i.e. at file scope). The non-threads * case below uses it to declare the data as static. */ #define START_MY_CXT #if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 )) /* Fetches the SV that keeps the per-interpreter data. */ #define dMY_CXT_SV \ SV *my_cxt_sv = perl_get_sv(MY_CXT_KEY, FALSE) #else /* >= perl5.004_68 */ #define dMY_CXT_SV \ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \ sizeof(MY_CXT_KEY)-1, TRUE) #endif /* < perl5.004_68 */ /* This declaration should be used within all functions that use the * interpreter-local data. */ #define dMY_CXT \ dMY_CXT_SV; \ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv)) /* Creates and zeroes the per-interpreter data. * (We allocate my_cxtp in a Perl SV so that it will be released when * the interpreter goes away.) */ #define MY_CXT_INIT \ dMY_CXT_SV; \ /* newSV() allocates one more than needed */ \ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ Zero(my_cxtp, 1, my_cxt_t); \ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) /* This macro must be used to access members of the my_cxt_t structure. * e.g. MYCXT.some_data */ #define MY_CXT (*my_cxtp) /* Judicious use of these macros can reduce the number of times dMY_CXT * is used. Use is similar to pTHX, aTHX etc. */ #define pMY_CXT my_cxt_t *my_cxtp #define pMY_CXT_ pMY_CXT, #define _pMY_CXT ,pMY_CXT #define aMY_CXT my_cxtp #define aMY_CXT_ aMY_CXT, #define _aMY_CXT ,aMY_CXT #else /* single interpreter */ #define START_MY_CXT static my_cxt_t my_cxt; #define dMY_CXT_SV dNOOP #define dMY_CXT dNOOP #define MY_CXT_INIT NOOP #define MY_CXT my_cxt #define pMY_CXT void #define pMY_CXT_ #define _pMY_CXT #define aMY_CXT #define aMY_CXT_ #define _aMY_CXT #endif #endif /* START_MY_CXT */ #ifndef IVdf # if IVSIZE == LONGSIZE # define IVdf "ld" # define UVuf "lu" # define UVof "lo" # define UVxf "lx" # define UVXf "lX" # else # if IVSIZE == INTSIZE # define IVdf "d" # define UVuf "u" # define UVof "o" # define UVxf "x" # define UVXf "X" # endif # endif #endif #ifndef NVef # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ defined(PERL_PRIfldbl) /* Not very likely, but let's try anyway. */ # define NVef PERL_PRIeldbl # define NVff PERL_PRIfldbl # define NVgf PERL_PRIgldbl # else # define NVef "e" # define NVff "f" # define NVgf "g" # endif #endif #ifndef AvFILLp /* Older perls (<=5.003) lack AvFILLp */ # define AvFILLp AvFILL #endif #ifdef SvPVbyte # if PERL_REVISION == 5 && PERL_VERSION < 7 /* SvPVbyte does not work in perl-5.6.1, borrowed version for 5.7.3 */ # undef SvPVbyte # define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp)) static char * my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); return SvPV(sv,*lp); } # endif #else # define SvPVbyte SvPV #endif #ifndef SvPV_nolen # define SvPV_nolen(sv) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_nolen(sv)) static char * sv_2pv_nolen(pTHX_ register SV *sv) { STRLEN n_a; return sv_2pv(sv, &n_a); } #endif #endif /* _P_P_PORTABILITY_H_ */ /* End of File ppport.h */

Last modified June 27 2005 04:20 PM

Contact UVM © 2014 The University of Vermont - Burlington, VT 05405 - (802) 656-3131