Skip to content

Commit

Permalink
Sync with the ecelerity jlog sources
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Apr 17, 2008
1 parent 9e4597f commit adf2ee8
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 37 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
Copyright (c) 2005-2008, Message Systems, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -11,7 +11,7 @@ met:
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name OmniTI Computer Consulting, Inc. nor the names
* Neither the name Message Systems, Inc. nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
Expand Down
12 changes: 7 additions & 5 deletions jlog.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down Expand Up @@ -149,10 +149,10 @@ int jlog_repair_datafile(jlog_ctx *ctx, u_int32_t log)
SYS_FAIL(JLOG_ERR_FILE_READ);

orig_len = ctx->mmap_len;
mmap_end = ctx->mmap_base + ctx->mmap_len;
mmap_end = (char*)ctx->mmap_base + ctx->mmap_len;
/* these values will cause us to fall right into the error clause and
* start searching for a valid header from offset 0 */
this = ctx->mmap_base - sizeof(hdr);
this = (char*)ctx->mmap_base - sizeof(hdr);
hdr.reserved = 0;
hdr.mlen = 0;

Expand Down Expand Up @@ -248,7 +248,7 @@ int jlog_inspect_datafile(jlog_ctx *ctx, u_int32_t log)
if (__jlog_mmap_reader(ctx, log) != 0)
SYS_FAIL(JLOG_ERR_FILE_READ);

mmap_end = ctx->mmap_base + ctx->mmap_len;
mmap_end = (char*)ctx->mmap_base + ctx->mmap_len;
this = ctx->mmap_base;
i = 0;
while (this + sizeof(hdr) <= mmap_end) {
Expand Down Expand Up @@ -859,6 +859,8 @@ ___jlog_resync_index(jlog_ctx *ctx, u_int32_t log, jlog_id *last,

if (!jlog_file_pread(ctx->data, &logmhdr, sizeof(logmhdr), data_off))
SYS_FAIL(JLOG_ERR_FILE_READ);
if (logmhdr.reserved != 0)
SYS_FAIL(JLOG_ERR_FILE_CORRUPT);
if ((next_off += sizeof(logmhdr) + logmhdr.mlen) > data_len)
break;

Expand Down
4 changes: 2 additions & 2 deletions jlog.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlog_config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlog_hash.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlog_hash.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlog_io.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlog_io.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlog_private.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jlogctl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jtest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions jthreadtest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
2 changes: 1 addition & 1 deletion perl/Makefile.PL.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WriteMakefile(
PREREQ_PM => {},
($] >= 5.005 ?
(ABSTRACT_FROM => 'lib/JLog.pm',
AUTHOR => 'George Schlossnagle <george@int.omniti.net>') : ()),
AUTHOR => 'George Schlossnagle <george@omniti.com>') : ()),
LDDLFLAGS => "$Config{lddlflags} @RLDFLAG@@libdir@",
LIBS => ["-L@libdir@ -L.. -ljlog"],
INC => '-I.. -I. -I../..',
Expand Down
2 changes: 1 addition & 1 deletion perl/README
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This module requires these other modules and libraries:

COPYRIGHT AND LICENCE

Copyright (C) 2006 by George Schlossnagle
Copyright (C) 2006-2008 Message Systems, Inc.

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.5 or,
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/JLog.pm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ JLog::Writer
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2006 by OmniTI, Inc.
Copyright (C) 2006-2008 by Message Systems, Inc.
=cut
2 changes: 1 addition & 1 deletion perl/lib/JLog/Reader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ JLog::Writer
=head1 COPYRIGHT
Copyright (C) 2006 by OmniTI, Inc.
Copyright (C) 2006-2008 by Message Systems, Inc.
=cut
2 changes: 1 addition & 1 deletion perl/lib/JLog/Writer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ JLog::Reader
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2006 by OmniTI, Inc.
Copyright (C) 2006-2008 by Message Systems, Inc.
=cut
14 changes: 13 additions & 1 deletion php/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ PHP_ARG_WITH(jlog, jlog,[ --with-jlog[=DIR] With jlog support])

if test "$PHP_JLOG" != "no"; then
if test "$PHP_JLOG" == "yes"; then
PHP_JLOG="/opt/ecelerity"
if test -d /opt/msys ; then
PHP_JLOG="/opt/msys/jlog"
else
PHP_JLOG="/opt/ecelerity"
fi
fi
export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_JLOG"

PHP_ADD_INCLUDE(..)
PHP_ADD_INCLUDE(../..)
PHP_ADD_INCLUDE(.)
PHP_ADD_INCLUDE($PHP_JLOG/include)
case $PHP_JLOG in
*ecelerity*)
dnl has architecture specific include dir
archdir=`uname -p`
PHP_ADD_INCLUDE($PHP_JLOG/include/$archdir)
;;
esac
export OLD_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_JLOG"
AC_CHECK_HEADER([jlog.h], [], AC_MSG_ERROR('jlog.h' header not found))
Expand Down
4 changes: 2 additions & 2 deletions php/jlog.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down
4 changes: 2 additions & 2 deletions php/php_jlog.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
* Copyright (c) 2005-2008, Message Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* * Neither the name Message Systems, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
Expand Down

0 comments on commit adf2ee8

Please sign in to comment.