On Mon, 23 May 2011 18:45:14 +0200, "Bugs in DBD-SQLite via RT"
<bug-dbd-sql...@rt.cpan.org> wrote:

> See also
>     https://rt.cpan.org/Ticket/Display.html?id=68396

This (rather clear) bug report neither got any acknowledgement, not
does it appear in the RT trackers.

Meanwhile things got even worse.
 
> Using gcc-3.4.6 on HP-UX 10.20:

HP-UX 10.20 does not have pread at all. -UUSE_PREAD doesn't work
(enough) as the test is (very) wrong. SQLITE_ENABLE_LOCKING_STYLE is
overruled in this section when passed as -USQLITE_ENABLE_LOCKING_STYLE

--8<--- line 23983
#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
#  if defined(__APPLE__)
#    define SQLITE_ENABLE_LOCKING_STYLE 1
#  else
#    define SQLITE_ENABLE_LOCKING_STYLE 0
#  endif
#endif
-->8---

And thus leaving
--8<--- line 24453
#if defined(USE_PREAD) || defined(SQLITE_ENABLE_LOCKING_STYLE)
  { "pread",        (sqlite3_syscall_ptr)pread,      0  },
#else
  { "pread",        (sqlite3_syscall_ptr)0,          0  },
#endif
-->8---

a useless and bogus test.

That second test (also for pwrite) should either test for the *content*
of SQLITE_ENABLE_LOCKING_STYLE or not test on it at all

> > make test
> gcc -c  -I. -I/opt/perl/lib/site_perl/5.14.0/PA-RISC2.0/auto/DBI -mpa-
> risc-1-1 -DPERL_DONT_CREATE_GVSV -D_HPUX_SOURCE -fno-strict-aliasing -
> pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=
> \"1.31\" -DXS_VERSION=\"1.31\" -fPIC "-I/opt/perl/lib/5.14.0/PA-RISC2.0/
> CORE"  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -
> DSQLITE_ENABLE_COLUMN_METADATA -DNDEBUG=1 -DHAVE_USLEEP=1 -
> DTHREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION sqlite3.c
> sqlite3.c: In function `unixShmMap':
> sqlite3.c:26184: error: `MAP_FAILED' undeclared (first use in this 
> function)
> sqlite3.c:26184: error: (Each undeclared identifier is reported only 
> once
> sqlite3.c:26184: error: for each function it appears in.)
> 
> After applying this patch:
> --8<---
> --- sqlite3.c.org       2011-05-23 15:27:35 +0200
> +++ sqlite3.c   2011-05-23 15:29:55 +0200
> @@ -22661,6 +22661,10 @@ struct unixFile {
>  */
>  #define SQLITE_WHOLE_FILE_LOCKING  0x0001   /* Use whole-file locking */
> 
> +#ifndef MAP_FAILED
> +#define MAP_FAILED   ((void *) -1)
> +#endif
> +
>  /*
>  ** Include code that is common to all os_*.c files
>  */
> -->8---
> 
> > make test
> :
> All tests successful.
> Files=59, Tests=1308, 87 wallclock secs ( 4.61 usr  0.48 sys + 53.42 
> cusr  3.96 csys = 62.47 CPU)
> Result: PASS
> >


-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to