V
vladimir.giron
Hi
I'm working with Perl and I use the Compress Zlib library in the code..
the compress zlib module doesn't come with all of perl releases, you
have to download it.. when finished I want to put my program online so
anybody can download it and use it no matter what release of perl
they're using without downloading extra modules and because of this I
considered Inline C but searching more about this on the Internet I
found this:
"Inline C works on all of the Perl platforms that I have tested it with
so far. This includes all common Unixes and recent versions of
Microsoft Windows. The only catch is that you must have the same
compiler and make utility that was used to build your perl binary."
This means that if I make this program with inline C the enduser must
have the same compiler and make utility I used to be able to run it,
right?
Is there any other way I can make one single file? The problem is that
the Zlib uses and XS file (C code) and I would have to translate to
Perl things like
gzopen_(path, mode)
char * path
char * mode
CODE:
gzFile gz ;
gz = gzopen(path, mode) ;
if (gz) {
ZMALLOC(RETVAL, gzType) ;
RETVAL->buffer = newSV(SIZE) ;
SvPOK_only(RETVAL->buffer) ;
SvCUR_set(RETVAL->buffer, 0) ;
RETVAL->offset = 0 ;
RETVAL->gz = gz ;
RETVAL->closed = FALSE ;
SetGzErrorNo(0) ;
}
else {
RETVAL = NULL ;
SetGzErrorNo(errno ? Z_ERRNO : Z_MEM_ERROR) ;
}
OUTPUT:
RETVAL
I'm working with Perl and I use the Compress Zlib library in the code..
the compress zlib module doesn't come with all of perl releases, you
have to download it.. when finished I want to put my program online so
anybody can download it and use it no matter what release of perl
they're using without downloading extra modules and because of this I
considered Inline C but searching more about this on the Internet I
found this:
"Inline C works on all of the Perl platforms that I have tested it with
so far. This includes all common Unixes and recent versions of
Microsoft Windows. The only catch is that you must have the same
compiler and make utility that was used to build your perl binary."
This means that if I make this program with inline C the enduser must
have the same compiler and make utility I used to be able to run it,
right?
Is there any other way I can make one single file? The problem is that
the Zlib uses and XS file (C code) and I would have to translate to
Perl things like
gzopen_(path, mode)
char * path
char * mode
CODE:
gzFile gz ;
gz = gzopen(path, mode) ;
if (gz) {
ZMALLOC(RETVAL, gzType) ;
RETVAL->buffer = newSV(SIZE) ;
SvPOK_only(RETVAL->buffer) ;
SvCUR_set(RETVAL->buffer, 0) ;
RETVAL->offset = 0 ;
RETVAL->gz = gz ;
RETVAL->closed = FALSE ;
SetGzErrorNo(0) ;
}
else {
RETVAL = NULL ;
SetGzErrorNo(errno ? Z_ERRNO : Z_MEM_ERROR) ;
}
OUTPUT:
RETVAL