On Sun, 3 Jun 2001, Brian Ingerson wrote:
> Fixed David Coppit's postamble problem. (Just deleted a bunch of lines
> :)
This version (and maybe 0.41-TRIAL1--I didn't check) has trouble
compiling my module, whereas 0.40 didn't. If I delete the function
declaration for the problem function, it works okay:
out.make:
--------------
make[1]: Entering directory
`/home/david/software/grepmail/devel/FastReader/_Inline/build/Mail/Folder/FastReader'
/usr/bin/perl -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0
/usr/lib/perl5/5.6.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.6.0/ExtUtils/typemap
FastReader.xs > FastReader.xsc && mv FastReader.xsc FastReader.c
Warning: duplicate function definition '_ends_with_include' detected in FastReader.xs,
line 217
gcc -c -fno-strict-aliasing -O2 -march=i386 -mcpu=i686 -DVERSION=\"0.10\"
-DXS_VERSION=\"0.10\" -fPIC -I/usr/lib/perl5/5.6.0/i386-linux/CORE FastReader.c
FastReader.xs:10:15: warning: "DEBUG" redefined
/usr/lib/perl5/5.6.0/i386-linux/CORE/perl.h:2027:1: warning: this is the location of
the previous definition
FastReader.c:258: redefinition of `XS_Mail__Folder__FastReader__ends_with_include'
FastReader.c:215: `XS_Mail__Folder__FastReader__ends_with_include' previously defined
here
make[1]: *** [FastReader.o] Error 1
make[1]: Leaving directory
`/home/david/software/grepmail/devel/FastReader/_Inline/build/Mail/Folder/FastReader'
--------------
FastReader.pm (abbreviated):
--------------
package Mail::Folder::FastReader;
use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
@ISA = qw(Exporter);
@EXPORT = qw();
@EXPORT_OK = qw( reset_file read_email );
$VERSION = '0.10';
use Inline (C => DATA =>
NAME => 'Mail::Folder::FastReader',
VERSION => '0.10',
);
1;
__DATA__
__C__
#include <stdio.h>
#include <string.h>
#define DEBUG 0
/* REMOVING THIS FIXES (OR HIDES?) THE PROBLEM */
int _ends_with_include(char *email_boundary);
// Some global declarations deleted
int read_email(char **email,long *email_line)
{
// deleted
}
void reset_file(FILE *infile)
{
// deleted
}
int _ends_with_include(char *email_boundary)
{
// deleted
}
--------------
David
_________________________________________________________________________
David Coppit - Ph.D. Candidate [EMAIL PROTECTED]
The University of Virginia http://coppit.org/
"Yes," said Piglet, "Rabbit has Brain." There was a long silence.
"I suppose," said Pooh, "that that's why he never understands anything."