├── deps ├── libdrizzle │ ├── NEWS │ ├── prototest │ │ ├── prototest │ │ │ ├── __init__.py │ │ │ └── mysql │ │ │ │ └── __init__.py │ │ └── drizzle_flood │ ├── tests │ │ ├── gdb-run │ │ ├── common.h │ │ ├── run.sh │ │ ├── drizzle_query_st.c │ │ ├── drizzle_result_st.c │ │ └── drizzle_column_st.c │ ├── .quickly │ ├── AUTHORS │ ├── support │ │ └── libdrizzle.pc.in │ ├── m4 │ │ ├── pandora_run_cpplint.m4 │ │ ├── pandora_version.m4 │ │ ├── pandora_extensions.m4 │ │ ├── pandora_clock_gettime.m4 │ │ ├── pandora_header_assert.m4 │ │ ├── pandora_check_cxx_standard.m4 │ │ ├── pandora_fdatasync.m4 │ │ ├── pandora_libtool.m4 │ │ ├── pandora_with_r.m4 │ │ ├── pandora_check_compiler_version.m4 │ │ ├── pandora_cxx_demangle.m4 │ │ ├── pandora_use_pipe.m4 │ │ ├── pandora_swig.m4 │ │ ├── pandora_cstdint.m4 │ │ ├── pandora_have_gcc_atomics.m4 │ │ ├── pandora_have_libbdb.m4 │ │ ├── pandora_cinttypes.m4 │ │ ├── pandora_with_python.m4 │ │ ├── pandora_have_innodb.m4 │ │ ├── pandora_have_libpqxx.m4 │ │ ├── pandora_have_thrift.m4 │ │ ├── pandora_have_libvbucket.m4 │ │ ├── pandora_have_libgtest.m4 │ │ ├── pandora_have_libsqlite3.m4 │ │ ├── pandora_have_libhashkit.m4 │ │ ├── pandora_have_libz.m4 │ │ ├── pandora_have_libavahi.m4 │ │ ├── pandora_have_libpq.m4 │ │ ├── pandora_with_memcached.m4 │ │ ├── pandora_have_libgearman.m4 │ │ ├── pandora_have_libdl.m4 │ │ ├── pandora_have_libcassandra.m4 │ │ ├── pandora_have_libboost_thread.m4 │ │ ├── pandora_with_python3.m4 │ │ ├── pandora_have_libuuid.m4 │ │ ├── pandora_with_gettext.m4 │ │ ├── pandora_have_libxml2.m4 │ │ ├── pandora_have_libboost_options.m4 │ │ ├── pandora_with_php.m4 │ │ ├── pandora_with_lua.m4 │ │ ├── pandora_have_libevent.m4 │ │ ├── pandora_have_better_malloc.m4 │ │ ├── pandora_print_callstack.m4 │ │ ├── pandora_have_libtokyocabinet.m4 │ │ ├── pandora_have_libinnodb.m4 │ │ ├── pandora_shared_ptr.m4 │ │ ├── pandora_have_libpcre.m4 │ │ ├── pandora_have_libdrizzle.m4 │ │ └── pandora_have_libldap.m4 │ ├── docs │ │ ├── api_header.html │ │ ├── dev_header.html │ │ └── doxygen.h │ ├── win32 │ │ ├── config.h │ │ ├── conn_uds.c │ │ ├── poll.h │ │ └── alloca.h │ ├── bin │ │ └── mysql_password_hash.c │ ├── libdrizzle │ │ ├── command_server.h │ │ ├── command_client.h │ │ ├── sha1.h │ │ ├── row_server.h │ │ ├── field_server.h │ │ ├── common.h │ │ ├── result_client.h │ │ ├── handshake_server.h │ │ ├── conn_uds.c │ │ ├── visibility.h │ │ ├── field_client.h │ │ ├── handshake_client.h │ │ ├── pack.h │ │ └── state.c │ ├── README │ ├── COPYING │ └── ChangeLog ├── libuv │ ├── src │ │ ├── unix │ │ │ ├── eio │ │ │ │ ├── autogen.sh │ │ │ │ ├── Makefile.am │ │ │ │ ├── configure.ac │ │ │ │ └── LICENSE │ │ │ ├── ev │ │ │ │ ├── autogen.sh │ │ │ │ ├── configure.ac │ │ │ │ ├── Makefile.am │ │ │ │ ├── libev.m4 │ │ │ │ └── LICENSE │ │ │ └── uv-eio.h │ │ ├── ares │ │ │ ├── CHANGES │ │ │ ├── ares_version.c │ │ │ ├── windows_port.c │ │ │ ├── README.node │ │ │ ├── README.cares │ │ │ ├── CMakeLists.txt │ │ │ ├── AUTHORS │ │ │ ├── TODO │ │ │ ├── RELEASE-NOTES │ │ │ ├── NEWS │ │ │ ├── ares_nowarn.h │ │ │ ├── ares_free_string.c │ │ │ ├── bitncmp.h │ │ │ ├── ares_strdup.h │ │ │ ├── inet_ntop.h │ │ │ ├── ares_strcasecmp.h │ │ │ ├── ares_writev.h │ │ │ ├── inet_net_pton.h │ │ │ ├── ares_strdup.c │ │ │ ├── ares_free_hostent.c │ │ │ ├── ares_library_init.h │ │ │ ├── ares_llist.h │ │ │ ├── get_ver.awk │ │ │ ├── ares_nowarn.c │ │ │ ├── bitncmp.c │ │ │ ├── ares_strcasecmp.c │ │ │ ├── ares_writev.c │ │ │ ├── ares_strerror.c │ │ │ ├── ares_fds.c │ │ │ └── ares_getopt.h │ │ ├── uv-common.h │ │ └── win │ │ │ └── tty.c │ ├── .mailmap │ ├── include │ │ ├── ares_version.h │ │ └── uv-private │ │ │ └── uv-linux.h │ ├── AUTHORS │ ├── test │ │ ├── test-pass-always.c │ │ ├── test-fail-always.c │ │ ├── runner-unix.h │ │ ├── runner-win.h │ │ ├── test-hrtime.c │ │ ├── test-threadpool.c │ │ ├── test-tty.c │ │ └── benchmark-sizes.c │ ├── LICENSE │ └── gyp_uv └── http_parser │ ├── CONTRIBUTIONS │ ├── LICENSE-MIT │ ├── Makefile │ └── http_parser.gyp ├── tools └── gyp │ ├── OWNERS │ ├── .gitignore │ ├── pylib │ └── gyp │ │ ├── generator │ │ ├── __init__.py │ │ ├── msvs_test.py │ │ ├── gypsh.py │ │ └── dump_dependency_json.py │ │ └── MSVSToolFile.py │ ├── AUTHORS │ ├── gyp.bat │ ├── gyp_dummy.c │ ├── samples │ └── samples.bat │ ├── DEPS │ ├── codereview.settings │ ├── gyp │ ├── MANIFEST │ ├── tools │ └── README │ ├── setup.py │ ├── PRESUBMIT.py │ └── LICENSE ├── gen.bat ├── .gitignore ├── local.gypi.example ├── test.php ├── README.md └── phode.gyp /deps/libdrizzle/NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/gyp/OWNERS: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /tools/gyp/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/generator/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/libdrizzle/prototest/prototest/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/libdrizzle/tests/gdb-run: -------------------------------------------------------------------------------- 1 | run 2 | bt 3 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/eio/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf --install --symlink --force 4 | -------------------------------------------------------------------------------- /gen.bat: -------------------------------------------------------------------------------- 1 | call tools\gyp\gyp.bat phode.gyp -I common.gypi -Dlibrary=static_library --depth=. 2 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/CHANGES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnoordhuis/phode/HEAD/deps/libuv/src/ares/CHANGES -------------------------------------------------------------------------------- /deps/libuv/src/unix/ev/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | libtoolize --force 4 | automake --add-missing --force-missing 5 | autoreconf 6 | 7 | -------------------------------------------------------------------------------- /deps/libdrizzle/.quickly: -------------------------------------------------------------------------------- 1 | project = libdrizzle 2 | version = 0.4.2 3 | template = pandora-build 4 | project-type = application 5 | pandora-version = 0.140 6 | -------------------------------------------------------------------------------- /deps/libdrizzle/AUTHORS: -------------------------------------------------------------------------------- 1 | Eric Day 2 | Monty Taylor 3 | Brian Aker 4 | Stewart Smith 5 | Lenz Grimmer 6 | Nathan Williams 7 | Ross McFarland 8 | Evan Jones 9 | -------------------------------------------------------------------------------- /tools/gyp/AUTHORS: -------------------------------------------------------------------------------- 1 | # Names should be added to this file like so: 2 | # Name or Organization 3 | 4 | Google Inc. 5 | Steven Knight 6 | Ryan Norton 7 | -------------------------------------------------------------------------------- /deps/libdrizzle/prototest/prototest/mysql/__init__.py: -------------------------------------------------------------------------------- 1 | from bitfield import * 2 | from packet import * 3 | from handshake import * 4 | from result import * 5 | from command import * 6 | from column import * 7 | -------------------------------------------------------------------------------- /tools/gyp/gyp.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright (c) 2009 Google Inc. All rights reserved. 2 | @rem Use of this source code is governed by a BSD-style license that can be 3 | @rem found in the LICENSE file. 4 | 5 | @python "%~dp0/gyp" %* 6 | -------------------------------------------------------------------------------- /deps/http_parser/CONTRIBUTIONS: -------------------------------------------------------------------------------- 1 | Contributors must agree to the Contributor License Agreement before patches 2 | can be accepted. 3 | 4 | http://spreadsheets2.google.com/viewform?hl=en&formkey=dDJXOGUwbzlYaWM4cHN1MERwQS1CSnc6MQ 5 | -------------------------------------------------------------------------------- /tools/gyp/gyp_dummy.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tools/gyp/samples/samples.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright (c) 2009 Google Inc. All rights reserved. 2 | @rem Use of this source code is governed by a BSD-style license that can be 3 | @rem found in the LICENSE file. 4 | 5 | @python %~dp0/samples %* 6 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_version.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ares_setup.h" 3 | #include "ares.h" 4 | 5 | const char *ares_version(int *version) 6 | { 7 | if(version) 8 | *version = ARES_VERSION; 9 | 10 | return ARES_VERSION_STR; 11 | } 12 | -------------------------------------------------------------------------------- /tools/gyp/DEPS: -------------------------------------------------------------------------------- 1 | # DEPS file for gclient use in buildbot execution of gyp tests. 2 | # 3 | # (You don't need to use gclient for normal GYP development work.) 4 | 5 | deps = { 6 | "scons": 7 | "http://src.chromium.org/svn/trunk/src/third_party/scons@44099", 8 | } 9 | -------------------------------------------------------------------------------- /deps/libdrizzle/support/libdrizzle.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libdrizzle 7 | Description: Drizzle Client & Protocol Library 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -ldrizzle 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # local user files 2 | /local.gypi 3 | 4 | # unix gyp and build products 5 | Makefile 6 | *.Makefile 7 | *.mk 8 | *.pyc 9 | /out/ 10 | 11 | # windows gyp and build products 12 | *.opensdf 13 | *.sln 14 | *.sdf 15 | *.suo 16 | *.vcxproj 17 | *.vcxproj.filters 18 | *.vcxproj.user 19 | /Debug/ 20 | /Release/ 21 | /ipch/ 22 | obj/ 23 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/uv-eio.h: -------------------------------------------------------------------------------- 1 | /* This header is private to libuv */ 2 | #ifndef UV_EIO_H_ 3 | #define UV_EIO_H_ 4 | 5 | #include "eio.h" 6 | 7 | /* 8 | * Call this function to integrate libeio into the libuv event loop. It is 9 | * safe to call more than once. 10 | * TODO: uv_eio_deinit 11 | */ 12 | void uv_eio_init(uv_loop_t*); 13 | #endif 14 | -------------------------------------------------------------------------------- /local.gypi.example: -------------------------------------------------------------------------------- 1 | { 2 | 'variables': { 3 | 'PHP_INCLUDE_PATH': '../../opt/php5/include/php', 4 | 'host_arch': 'x64', 5 | 'target_arch': 'x64', 6 | }, 7 | 'target_defaults': { 8 | 'include_dirs': [ 9 | ], 10 | 'defines': [ 11 | ], 12 | 'cflags': [ 13 | ], 14 | 'libraries': [ 15 | ], 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_run_cpplint.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([PANDORA_RUN_CPPLINT],[ 7 | m4_syscmd([python config/make-lint.py]) 8 | ]) 9 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/eio/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign no-dependencies 2 | 3 | VERSION_INFO = 1:0 4 | 5 | EXTRA_DIST = LICENSE Changes autogen.sh 6 | 7 | #man_MANS = ev.3 8 | 9 | include_HEADERS = eio.h 10 | 11 | lib_LTLIBRARIES = libeio.la 12 | 13 | libeio_la_SOURCES = eio.c ecb.h xthread.h config.h 14 | libeio_la_LDFLAGS = -version-info $(VERSION_INFO) 15 | 16 | -------------------------------------------------------------------------------- /deps/libdrizzle/docs/api_header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | $title 4 | 5 | 6 |

libdrizzle Public API Documentation

7 | -------------------------------------------------------------------------------- /deps/libdrizzle/docs/dev_header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | $title 4 | 5 | 6 |

libdrizzle Developer Documentation

7 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/ev/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT 2 | AC_CONFIG_SRCDIR([ev_epoll.c]) 3 | 4 | AM_INIT_AUTOMAKE(libev,4.04) dnl also update ev.h! 5 | AC_CONFIG_HEADERS([config.h]) 6 | AM_MAINTAINER_MODE 7 | 8 | AC_PROG_INSTALL 9 | AC_PROG_LIBTOOL 10 | 11 | if test "x$GCC" = xyes ; then 12 | CFLAGS="-O3 $CFLAGS" 13 | fi 14 | 15 | m4_include([libev.m4]) 16 | 17 | AC_CONFIG_FILES([Makefile]) 18 | AC_OUTPUT 19 | -------------------------------------------------------------------------------- /tools/gyp/codereview.settings: -------------------------------------------------------------------------------- 1 | # This file is used by gcl to get repository specific information. 2 | CODE_REVIEW_SERVER: codereview.chromium.org 3 | CC_LIST: gyp-developer@googlegroups.com 4 | VIEW_VC: http://code.google.com/p/gyp/source/detail?r= 5 | TRY_ON_UPLOAD: True 6 | TRYSERVER_PROJECT: gyp 7 | TRYSERVER_PATCHLEVEL: 0 8 | TRYSERVER_ROOT: trunk 9 | TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl 10 | 11 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/eio/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.59) 2 | AC_INIT 3 | AC_CONFIG_SRCDIR([eio.h]) 4 | AC_CONFIG_HEADERS([config.h]) 5 | 6 | AM_INIT_AUTOMAKE(libeio,1.0) 7 | AM_MAINTAINER_MODE 8 | 9 | AC_GNU_SOURCE 10 | 11 | AC_PROG_LIBTOOL 12 | 13 | AC_PROG_CC 14 | 15 | if test "x$GCC" = xyes ; then 16 | CFLAGS="-O3 $CFLAGS" 17 | fi 18 | 19 | m4_include([libeio.m4]) 20 | 21 | AC_CONFIG_FILES([Makefile]) 22 | AC_OUTPUT 23 | -------------------------------------------------------------------------------- /deps/libuv/.mailmap: -------------------------------------------------------------------------------- 1 | # update AUTHORS with: 2 | # git log --all --reverse --format='%aN <%aE>' | perl -ne 'BEGIN{print "# Authors ordered by first contribution.\n"} print unless $h{$_}; $h{$_} = 1' > AUTHORS 3 | 4 | 5 | 6 | 7 | San-Tai Hsu 8 | Isaac Z. Schlueter 9 | -------------------------------------------------------------------------------- /deps/libdrizzle/docs/doxygen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Main page for Doxygen 14 | */ 15 | 16 | /** 17 | * @mainpage Drizzle Client & Protocol Library 18 | */ 19 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_version.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([PANDORA_VERSION],[ 7 | 8 | PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \ 9 | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'` 10 | AC_SUBST([PANDORA_HEX_VERSION]) 11 | ]) 12 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/ev/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign 2 | 3 | VERSION_INFO = 4:0:0 4 | 5 | EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ 6 | ev_vars.h ev_wrap.h \ 7 | ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ 8 | ev.3 ev.pod 9 | 10 | man_MANS = ev.3 11 | 12 | include_HEADERS = ev.h ev++.h event.h 13 | 14 | lib_LTLIBRARIES = libev.la 15 | 16 | libev_la_SOURCES = ev.c event.c 17 | libev_la_LDFLAGS = -version-info $(VERSION_INFO) 18 | 19 | -------------------------------------------------------------------------------- /test.php: -------------------------------------------------------------------------------- 1 | connect("127.0.0.1", 5432, function () use ($t) { 6 | echo "connected!\n"; 7 | $t->write("gheh!", function() use ($t) { 8 | echo "written!\n"; 9 | }); 10 | }); 11 | */ 12 | 13 | $server = new TCP(); 14 | $server->listen(80, function ($client) { 15 | echo "connected!\n"; 16 | var_dump($client); 17 | $client->write("HTTP 1.0 500 OK\r\n\r\nHello world!", function() use ($client) { 18 | echo "written!\n"; 19 | }); 20 | }); 21 | 22 | uv_run(); 23 | 24 | ?> -------------------------------------------------------------------------------- /deps/libuv/src/ares/windows_port.c: -------------------------------------------------------------------------------- 1 | #include "ares_setup.h" 2 | 3 | 4 | /* only do the following on windows 5 | */ 6 | #if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS) 7 | 8 | #ifdef __WATCOMC__ 9 | /* 10 | * Watcom needs a DllMain() in order to initialise the clib startup code. 11 | */ 12 | BOOL 13 | WINAPI DllMain (HINSTANCE hnd, DWORD reason, LPVOID reserved) 14 | { 15 | (void) hnd; 16 | (void) reason; 17 | (void) reserved; 18 | return (TRUE); 19 | } 20 | #endif 21 | 22 | #endif /* WIN32 builds only */ 23 | -------------------------------------------------------------------------------- /deps/libdrizzle/win32/config.h: -------------------------------------------------------------------------------- 1 | #ifndef __DRIZZLE_WIN32_CONFIG_H 2 | #define __DRIZZLE_WIN32_CONFIG_H 3 | 4 | 5 | #define HAVE_FCNTL_H 1 6 | #define HAVE_STDLIB_H 1 7 | #define HAVE_STRING_H 8 | 9 | typedef unsigned int in_port_t; 10 | typedef enum { false = 0, true = 1 } _Bool; 11 | typedef _Bool bool; 12 | 13 | struct sockaddr_un 14 | { 15 | short int sun_family; 16 | char sun_path[108]; 17 | }; 18 | 19 | #define snprintf _snprintf 20 | 21 | #define ECONNREFUSED WSAECONNRESET 22 | 23 | #endif /* __DRIZZLE_WIN32_CONFIG_H */ 24 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/README.node: -------------------------------------------------------------------------------- 1 | Library: c-ares, DNS resolver 2 | 3 | Version: 1.7.3 (11 June, 2010) 4 | 5 | Authors: Greg Hudson, Daniel Stenberg 6 | 7 | License: MIT 8 | 9 | Notes: 10 | 11 | Just use waf instead of the autoconf based configure script. Delete most of 12 | the documentation and other files distributed with it. To upgrade, run 13 | ./configure on linux, macintosh, solaris (and other supported platforms) and 14 | copy 15 | - ares_config.h 16 | - ares_setup.h 17 | - ares_build.h 18 | into the appropriate directory. 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tools/gyp/gyp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | # TODO(mark): sys.path manipulation is some temporary testing stuff. 10 | try: 11 | import gyp 12 | except ImportError, e: 13 | import os.path 14 | sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) 15 | import gyp 16 | 17 | if __name__ == '__main__': 18 | sys.exit(gyp.main(sys.argv[1:])) 19 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_extensions.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([PANDORA_EXTENSIONS],[ 7 | 8 | m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], 9 | [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], 10 | [AC_REQUIRE([AC_GNU_SOURCE])]) 11 | 12 | ]) 13 | 14 | AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],[ 15 | AC_REQUIRE([PANDORA_EXTENSIONS]) 16 | ]) 17 | -------------------------------------------------------------------------------- /tools/gyp/MANIFEST: -------------------------------------------------------------------------------- 1 | setup.py 2 | gyp 3 | LICENSE 4 | AUTHORS 5 | pylib/gyp/MSVSNew.py 6 | pylib/gyp/MSVSProject.py 7 | pylib/gyp/MSVSToolFile.py 8 | pylib/gyp/MSVSUserFile.py 9 | pylib/gyp/MSVSVersion.py 10 | pylib/gyp/SCons.py 11 | pylib/gyp/__init__.py 12 | pylib/gyp/common.py 13 | pylib/gyp/input.py 14 | pylib/gyp/xcodeproj_file.py 15 | pylib/gyp/generator/__init__.py 16 | pylib/gyp/generator/gypd.py 17 | pylib/gyp/generator/gypsh.py 18 | pylib/gyp/generator/make.py 19 | pylib/gyp/generator/msvs.py 20 | pylib/gyp/generator/scons.py 21 | pylib/gyp/generator/xcode.py 22 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/README.cares: -------------------------------------------------------------------------------- 1 | c-ares 2 | ====== 3 | 4 | This package is based on ares 1.1.1 (written by Greg Hudson). I decided to 5 | fork and release a separate project since the ares author didn't want the 6 | improvements that were vital for our use of it. 7 | 8 | This package is dubbed 'c-ares' since I (Daniel Stenberg) wanted this for use 9 | within the curl project (hence the letter C) and it makes a nice pun. Also, 10 | c-ares is not API compatible with ares: a new name makes that more obvious to 11 | the public. 12 | 13 | The original libares was distributed at athena-dist.mit.edu:pub/ATHENA/ares. 14 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 2 | include_directories(${node_platform}-${cares_arch}) 3 | add_definitions(-DHAVE_CONFIG_H=1) 4 | 5 | include(CheckLibraryExists) 6 | check_library_exists(socket socket "" HAVE_SOCKET_LIB) 7 | check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB) 8 | 9 | file(GLOB lib_sources *.c) 10 | add_library(cares ${lib_sources}) 11 | 12 | if(${HAVE_SOCKET_LIB}) 13 | set(cares_libs ${cares_libs} socket) 14 | endif() 15 | 16 | if(${HAVE_NSL_LIB}) 17 | set(cares_libs ${cares_libs} nsl) 18 | endif() 19 | 20 | if(cares_libs) 21 | target_link_libraries(cares ${cares_libs}) 22 | endif() 23 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_clock_gettime.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Monty Taylor 2 | dnl This file is free software; Monty Taylor 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for clock_gettime 8 | #-------------------------------------------------------------------- 9 | 10 | AC_DEFUN([PANDORA_CLOCK_GETTIME],[ 11 | AC_SEARCH_LIBS([clock_gettime],[rt]) 12 | AS_IF([test "x${ac_cv_search_clock_gettime}" != "xno"],[ 13 | AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have a working clock_gettime function]) 14 | ]) 15 | ]) 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # phode 2 | 3 | php + libuv = win 4 | 5 | ## status 6 | 7 | Very alpha. And not in the dominating male / leader of the pack sense. 8 | 9 | ## how to build 10 | 11 | Make sure you have the PHP 5.4 header files installed somewhere. 12 | 13 | $ cp local.gypi.example local.gypi 14 | $ vi local.gypi # update include paths 15 | $ tools/gyp/gyp -Dlibrary=shared_library 16 | $ make 17 | 18 | Add the following line to your `php.ini`. 19 | 20 | extension = /path/to/phode/out/Debug/obj.target/libphode.so 21 | 22 | Now try out some of the examples in the `test/` directory. 23 | 24 | $ php test/test-tcp-ping-pong.php 25 | Segmentation fault. 26 | 27 | The beauty of open source! 28 | -------------------------------------------------------------------------------- /deps/libuv/include/ares_version.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ARES__VERSION_H 3 | #define ARES__VERSION_H 4 | 5 | /* This is the global package copyright */ 6 | #define ARES_COPYRIGHT "2004 - 2010 Daniel Stenberg, ." 7 | 8 | #define ARES_VERSION_MAJOR 1 9 | #define ARES_VERSION_MINOR 7 10 | #define ARES_VERSION_PATCH 4 11 | #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ 12 | (ARES_VERSION_MINOR<<8)|\ 13 | (ARES_VERSION_PATCH)) 14 | #define ARES_VERSION_STR "1.7.4" 15 | 16 | #if (ARES_VERSION >= 0x010700) 17 | # define CARES_HAVE_ARES_LIBRARY_INIT 1 18 | # define CARES_HAVE_ARES_LIBRARY_CLEANUP 1 19 | #else 20 | # undef CARES_HAVE_ARES_LIBRARY_INIT 21 | # undef CARES_HAVE_ARES_LIBRARY_CLEANUP 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/AUTHORS: -------------------------------------------------------------------------------- 1 | c-ares is based on ares, and these are the people that have worked on it since 2 | the fork was made: 3 | 4 | Alexander Lazic 5 | Alexey Simak 6 | Andreas Rieke 7 | Ashish Sharma 8 | Brad House 9 | Brad Spencer 10 | Bram Matthys 11 | Dan Fandrich 12 | Daniel Stenberg 13 | Dirk Manske 14 | Dominick Meglio 15 | Doug Goldstein 16 | Duncan Wilcox 17 | Eino Tuominen 18 | Erik Kline 19 | George Neill 20 | Gisle Vanem 21 | Guilherme Balena Versiani 22 | Gunter Knauf 23 | Henrik Stoerner 24 | James Bursa 25 | Michael Wallner 26 | Nick Mathewson 27 | Phil Blundell 28 | Ravi Pratap 29 | Robin Cornelius 30 | Sebastian at basti79.de 31 | Shmulik Regev 32 | Steinar H. Gunderson 33 | Tofu Linden 34 | Vlad Dinulescu 35 | William Ahern 36 | Yang Tse 37 | liren at vivisimo.com 38 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/TODO: -------------------------------------------------------------------------------- 1 | TODO 2 | ==== 3 | 4 | ares_reinit() 5 | 6 | - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much 7 | like the res_init() resolver function offers 8 | 9 | ares_gethostbyname 10 | 11 | - When built to support IPv6, it needs to also support PF_UNSPEC or similar, 12 | so that an application can ask for any protocol and then c-ares would return 13 | all known resolves and not just explicitly IPv4 _or_ IPv6 resolves. 14 | 15 | ares_process 16 | 17 | - Upon next ABI breakage ares_process() should be changed to return 'int' 18 | and return ARES_ENOTINITIALIZED if ares_library_init() has not been called. 19 | 20 | ares_process_fd 21 | 22 | - Upon next ABI breakage ares_process_fd() should be changed to return 23 | 'int' and return ARES_ENOTINITIALIZED if library has not been initialized. 24 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_header_assert.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | dnl PANDORA_HEADER_ASSERT 7 | dnl ---------------- 8 | dnl Check whether to enable assertions. 9 | AC_DEFUN([PANDORA_HEADER_ASSERT], 10 | [ 11 | AC_CHECK_HEADERS(assert.h) 12 | AC_MSG_CHECKING([whether to enable assertions]) 13 | AC_ARG_ENABLE([assert], 14 | [AS_HELP_STRING([--disable-assert], 15 | [Turn off assertions])], 16 | [ac_cv_assert="no"], 17 | [ac_cv_assert="yes"]) 18 | AC_MSG_RESULT([$ac_cv_assert]) 19 | 20 | AS_IF([test "$ac_cv_assert" = "no"], 21 | [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])]) 22 | ]) 23 | 24 | -------------------------------------------------------------------------------- /deps/libdrizzle/bin/mysql_password_hash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | #include "config.h" 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | #define BUFFER_CHUNK 8192 19 | 20 | int main(int argc, char *argv[]) 21 | { 22 | char hashed_password[DRIZZLE_MYSQL_PASSWORD_HASH]; 23 | 24 | if (argc != 2) 25 | { 26 | printf("Usage: %s \n", argv[0]); 27 | return 1; 28 | } 29 | 30 | drizzle_mysql_password_hash(hashed_password, argv[1], strlen(argv[1])); 31 | 32 | printf("%s\n", hashed_password); 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /deps/libdrizzle/tests/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Includes and macros for tests 14 | */ 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | #define drizzle_test(...) do \ 24 | { \ 25 | printf(__VA_ARGS__); \ 26 | printf("\n"); \ 27 | } while (0); 28 | 29 | #define drizzle_test_error(...) do \ 30 | { \ 31 | printf("*** %s:%d *** ", __FILE__, __LINE__); \ 32 | printf(__VA_ARGS__); \ 33 | printf("\n"); \ 34 | exit(1); \ 35 | } while (0); 36 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/RELEASE-NOTES: -------------------------------------------------------------------------------- 1 | c-ares version 1.7.4 2 | 3 | Changed: 4 | 5 | o local-bind: Support binding to local interface/IPs, see 6 | ares_set_local_ip4, ares_set_local_ip6, ares_set_local_dev 7 | 8 | Fixed: 9 | 10 | o memory leak in ares_getnameinfo 11 | o add missing break that caused get_ares_servers to fail 12 | o ares_parse_a_reply: fix CNAME response parsing 13 | o init_by_options: don't copy an empty sortlist 14 | o Replaced uint32_t with unsigned int to fix broken builds 15 | on a couple of platforms 16 | o Fix lookup with HOSTALIASES set 17 | o adig: fix NAPTR parsing 18 | o compiler warning cleanups 19 | 20 | Thanks go to these friendly people for their efforts and contributions: 21 | 22 | Andrew C. Morrow, Ben Greear, Ben Noordhuis, Daniel Stenberg, 23 | Guenter Knauf, Mike Crowe, Patrik Thunstrom, Yang Tse 24 | 25 | Have fun! 26 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/command_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Command Declarations for Servers 14 | */ 15 | 16 | #ifndef __DRIZZLE_COMMAND_SERVER_H 17 | #define __DRIZZLE_COMMAND_SERVER_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_command_server Command Declarations for Servers 25 | * @ingroup drizzle_server_interface 26 | * 27 | * These functions allow you to read comands on a connection. 28 | * @{ 29 | */ 30 | 31 | /** @} */ 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif /* __DRIZZLE_COMMAND_SERVER_H */ 38 | -------------------------------------------------------------------------------- /tools/gyp/tools/README: -------------------------------------------------------------------------------- 1 | pretty_vcproj: 2 | Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2] 3 | 4 | They key/value pair are used to resolve vsprops name. 5 | 6 | For example, if I want to diff the base.vcproj project: 7 | 8 | pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > orignal.txt 9 | pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt 10 | 11 | And you can use your favorite diff tool to see the changes. 12 | 13 | Note: In the case of base.vcproj, the original vcproj is one level up the generated one. 14 | I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt 15 | before you perform the diff. -------------------------------------------------------------------------------- /tools/gyp/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | from distutils.core import setup 8 | from distutils.command.install import install 9 | from distutils.command.install_lib import install_lib 10 | from distutils.command.install_scripts import install_scripts 11 | 12 | setup( 13 | name='gyp', 14 | version='0.1', 15 | description='Generate Your Projects', 16 | author='Chromium Authors', 17 | author_email='chromium-dev@googlegroups.com', 18 | url='http://code.google.com/p/gyp', 19 | package_dir = {'': 'pylib'}, 20 | packages=['gyp', 'gyp.generator'], 21 | 22 | scripts = ['gyp'], 23 | cmdclass = {'install': install, 24 | 'install_lib': install_lib, 25 | 'install_scripts': install_scripts}, 26 | ) 27 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_check_cxx_standard.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[ 7 | AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X]) 8 | AS_IF([test "$GCC" = "yes"], 9 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[], 10 | [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"], 11 | [CXX_STANDARD="-std=gnu++0x"], 12 | [CXX_STANDARD="-std=gnu++98"]) 13 | ]) 14 | ]) 15 | AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}" 16 | 17 | save_CXXFLAGS="${CXXFLAGS}" 18 | CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}" 19 | AC_CXX_HEADER_STDCXX_98 20 | CXXFLAGS="${save_CXXFLAGS}" 21 | 22 | AC_SUBST([CXX_STANDARD]) 23 | ]) 24 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/NEWS: -------------------------------------------------------------------------------- 1 | Major changes since: 2 | * see the CHANGES file 3 | 4 | Major changes in release 1.1.1: 5 | * ares should now compile as C++ code (no longer uses reserved word 6 | "class"). 7 | * Added SRV support to adig test program. 8 | * Fixed a few error handling bugs in query processing. 9 | 10 | Major changes in release 1.1.0: 11 | * Added ares_free_string() function so that memory can be freed in the 12 | same layer as it is allocated, a desirable feature in some 13 | environments. 14 | * A few of the ares_dns.h macros are fixed to use the proper bitwise 15 | operator. 16 | * Fixed a couple of fenceposts fixed in ares_expand_name()'s 17 | bounds-checking. 18 | * In process_timeouts(), extract query->next before calling 19 | next_server() and possibly freeing the query structure. 20 | * Casted arguments to ctype macros casted to unsigned char, since not 21 | all char values are valid inputs to those macros according to ANSI. 22 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_nowarn.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_NOWARN_H 2 | #define HEADER_CARES_NOWARN_H 3 | 4 | 5 | /* Copyright (C) 2010 by Daniel Stenberg 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | int aresx_uztosi(size_t uznum); 21 | 22 | int aresx_sltosi(long slnum); 23 | 24 | #endif /* HEADER_CARES_NOWARN_H */ 25 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/command_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Command Declarations for Clients 14 | */ 15 | 16 | #ifndef __DRIZZLE_COMMAND_CLIENT_H 17 | #define __DRIZZLE_COMMAND_CLIENT_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_command_client Command Declarations for Clients 25 | * @ingroup drizzle_client_interface 26 | * 27 | * These functions are used to issue commands on a connection. Normal SQL 28 | * queries are issued using the drizzle_query* functions defined in query.h. 29 | * @{ 30 | */ 31 | 32 | /** @} */ 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* __DRIZZLE_COMMAND_CLIENT_H */ 39 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/sha1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @brief SHA1 Declarations 4 | */ 5 | 6 | #ifndef _SHA1_H 7 | #define _SHA1_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /** 14 | * @addtogroup sha1 SHA-1 in C 15 | * By Steve Reid 16 | * 100% Public Domain 17 | * @{ 18 | */ 19 | 20 | #define SHA1_BLOCK_LENGTH 64 21 | #define SHA1_DIGEST_LENGTH 20 22 | #define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1) 23 | 24 | typedef struct { 25 | uint32_t state[5]; 26 | uint64_t count; 27 | uint8_t buffer[SHA1_BLOCK_LENGTH]; 28 | } SHA1_CTX; 29 | 30 | void SHA1Init(SHA1_CTX *); 31 | void SHA1Pad(SHA1_CTX *); 32 | void SHA1Transform(uint32_t [5], const uint8_t [SHA1_BLOCK_LENGTH]); 33 | void SHA1Update(SHA1_CTX *, const uint8_t *, size_t); 34 | void SHA1Final(uint8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *); 35 | 36 | /** @} */ 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* _SHA1_H */ 43 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_fdatasync.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for a working fdatasync call 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([PANDORA_WORKING_FDATASYNC],[ 12 | AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[ 13 | AC_LANG_PUSH(C++) 14 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 15 | #include 16 | ]],[[ 17 | fdatasync(4); 18 | ]])], 19 | [ac_cv_func_fdatasync=yes], 20 | [ac_cv_func_fdatasync=no]) 21 | AC_LANG_POP() 22 | ]) 23 | AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"], 24 | [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])]) 25 | ]) 26 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_free_string.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 2000 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | #include 19 | #include "ares.h" 20 | #include "ares_private.h" 21 | 22 | void ares_free_string(void *str) 23 | { 24 | free(str); 25 | } 26 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/row_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Row Declarations for Servers 14 | */ 15 | 16 | #ifndef __DRIZZLE_ROW_SERVER_H 17 | #define __DRIZZLE_ROW_SERVER_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_row_server Row Declarations for Servers 25 | * @ingroup drizzle_server_interface 26 | * 27 | * These functions allow you to send row information over a connection. 28 | * @{ 29 | */ 30 | 31 | /** 32 | * Write next row. 33 | */ 34 | DRIZZLE_API 35 | drizzle_return_t drizzle_row_write(drizzle_result_st *result); 36 | 37 | /** @} */ 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* __DRIZZLE_ROW_SERVER_H */ 44 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_libtool.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([PANDORA_LIBTOOL],[ 7 | AC_REQUIRE([AC_DISABLE_STATIC]) 8 | AC_REQUIRE([AC_PROG_LIBTOOL]) 9 | m4_ifndef([LT_PREREQ],[ 10 | pandora_have_old_libtool=yes 11 | ],[ 12 | pandora_have_old_libtool=no 13 | ]) 14 | AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[ 15 | AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2]) 16 | ]) 17 | 18 | dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read 19 | dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT 20 | dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it. 21 | m4_ifdef([LT_LANG],[ 22 | LT_LANG(C) 23 | LT_LANG(C++) 24 | ]) 25 | ]) 26 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_r.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystems 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | AC_DEFUN([PANDORA_WITH_R],[ 13 | dnl Check for GNU R 14 | AC_ARG_WITH([r], 15 | [AS_HELP_STRING([--with-r], 16 | [Build R Bindings @<:@default=yes@:>@])], 17 | [with_r=$withval], 18 | [with_r=yes]) 19 | 20 | AS_IF([test "x$with_r" != "xno"],[ 21 | 22 | PKG_CHECK_MODULES([R], [libR], [ 23 | with_r=yes 24 | ],[ 25 | with_r=no 26 | ]) 27 | 28 | AC_SUBST(R_CFLAGS) 29 | AC_SUBST(R_LIBS) 30 | ]) 31 | AM_CONDITIONAL(BUILD_R, test "$with_r" = "yes") 32 | 33 | ]) 34 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/bitncmp.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARES_BITNCMP_H 2 | #define __ARES_BITNCMP_H 3 | 4 | 5 | /* Copyright (C) 2005 by Dominick Meglio 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #ifndef HAVE_BITNCMP 21 | int ares_bitncmp(const void *l, const void *r, int n); 22 | #else 23 | #define ares_bitncmp(x,y,z) bitncmp(x,y,z) 24 | #endif 25 | 26 | #endif /* __ARES_BITNCMP_H */ 27 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_strdup.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_STRDUP_H 2 | #define HEADER_CARES_STRDUP_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | 22 | #ifndef HAVE_STRDUP 23 | extern char *ares_strdup(const char *s1); 24 | #endif 25 | 26 | #endif /* HEADER_CARES_STRDUP_H */ 27 | -------------------------------------------------------------------------------- /deps/libdrizzle/win32/conn_uds.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief UDS Connection stubs for Windows 14 | */ 15 | 16 | #include "libdrizzle/common.h" 17 | #include "libdrizzle/conn_private.h" 18 | 19 | /* 20 | * Common definitions 21 | */ 22 | 23 | const char *drizzle_con_uds(drizzle_con_st *con) 24 | { 25 | (void)con; 26 | return (const char *)NULL; 27 | } 28 | 29 | void drizzle_con_set_uds(drizzle_con_st *con, const char *uds) 30 | { 31 | (void)con; 32 | (void)uds; 33 | } 34 | 35 | /* 36 | * Private definitions 37 | */ 38 | 39 | bool drizzle_con_uses_uds(drizzle_con_st *con) 40 | { 41 | (void)con; 42 | return false; 43 | } 44 | 45 | void drizzle_con_clone_uds(drizzle_con_st *con, drizzle_con_st *from) 46 | { 47 | (void)con; 48 | (void)from; 49 | } 50 | -------------------------------------------------------------------------------- /deps/libuv/AUTHORS: -------------------------------------------------------------------------------- 1 | # Authors ordered by first contribution. 2 | Ryan Dahl 3 | Bert Belder 4 | Josh Roesslein 5 | Alan Gutierrez 6 | Joshua Peek 7 | Igor Zinkovsky 8 | San-Tai Hsu 9 | Ben Noordhuis 10 | Henry Rawas 11 | Robert Mustacchi 12 | Matt Stevens 13 | Paul Querna 14 | Shigeki Ohtsu 15 | Tom Hughes 16 | Peter Bright 17 | Jeroen Janssen 18 | Andrea Lattuada 19 | Augusto Henrique Hentz 20 | Clifford Heath 21 | Jorge Chamorro Bieling 22 | Luis Lavena 23 | Matthew Sporleder 24 | Erick Tryzelaar 25 | Isaac Z. Schlueter 26 | Pieter Noordhuis 27 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/inet_ntop.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARES_INET_NTOP_H 2 | #define __ARES_INET_NTOP_H 3 | 4 | 5 | /* Copyright (C) 2005 by Dominick Meglio 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #ifdef HAVE_INET_NTOP 21 | #include 22 | #define ares_inet_ntop(w,x,y,z) inet_ntop(w,x,y,z) 23 | #else 24 | const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size); 25 | #endif 26 | 27 | #endif /* __ARES_INET_NTOP_H */ 28 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/field_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Field Declarations for Servers 14 | */ 15 | 16 | #ifndef __DRIZZLE_FIELD_SERVER_H 17 | #define __DRIZZLE_FIELD_SERVER_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_field_server Field Declarations for Servers 25 | * @ingroup drizzle_server_interface 26 | * 27 | * These functions allow you to send a field over a connection. 28 | * @{ 29 | */ 30 | 31 | DRIZZLE_API 32 | drizzle_return_t drizzle_field_write(drizzle_result_st *result, 33 | const drizzle_field_t field, size_t size, 34 | size_t total); 35 | 36 | /** @} */ 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* __DRIZZLE_FIELD_SERVER_H */ 43 | -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/generator/msvs_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Copyright (c) 2011 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | """ Unit tests for the msvs.py file. """ 8 | 9 | import gyp.generator.msvs as msvs 10 | import unittest 11 | import StringIO 12 | 13 | 14 | class TestSequenceFunctions(unittest.TestCase): 15 | 16 | def setUp(self): 17 | self.stderr = StringIO.StringIO() 18 | 19 | def test_GetLibraries(self): 20 | self.assertEqual( 21 | msvs._GetLibraries({}), 22 | []) 23 | self.assertEqual( 24 | msvs._GetLibraries({'libraries': []}), 25 | []) 26 | self.assertEqual( 27 | msvs._GetLibraries({'other':'foo', 'libraries': ['a.lib']}), 28 | ['a.lib']) 29 | self.assertEqual( 30 | msvs._GetLibraries({'libraries': ['a.lib', 'b.lib', 'c.lib', '-lb.lib', 31 | '-lb.lib', 'd.lib', 'a.lib']}), 32 | ['c.lib', 'b.lib', 'd.lib', 'a.lib']) 33 | 34 | if __name__ == '__main__': 35 | unittest.main() 36 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_check_compiler_version.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | 7 | AC_DEFUN([PANDORA_CHECK_C_VERSION],[ 8 | 9 | dnl Print version of C compiler 10 | AC_MSG_CHECKING("C Compiler version--$GCC") 11 | AS_IF([test "$GCC" = "yes"],[ 12 | CC_VERSION=`$CC --version | sed 1q` 13 | ],[AS_IF([test "$SUNCC" = "yes"],[ 14 | CC_VERSION=`$CC -V 2>&1 | sed 1q` 15 | ],[ 16 | CC_VERSION="" 17 | ]) 18 | ]) 19 | AC_MSG_RESULT("$CC_VERSION") 20 | AC_SUBST(CC_VERSION) 21 | ]) 22 | 23 | 24 | AC_DEFUN([PANDORA_CHECK_CXX_VERSION], [ 25 | dnl Print version of CXX compiler 26 | AC_MSG_CHECKING("C++ Compiler version") 27 | AS_IF([test "$GCC" = "yes"],[ 28 | CXX_VERSION=`$CXX --version | sed 1q` 29 | ],[AS_IF([test "$SUNCC" = "yes"],[ 30 | CXX_VERSION=`$CXX -V 2>&1 | sed 1q` 31 | ],[ 32 | CXX_VERSION="" 33 | ]) 34 | ]) 35 | AC_MSG_RESULT("$CXX_VERSION") 36 | AC_SUBST(CXX_VERSION) 37 | ]) 38 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_strcasecmp.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_STRCASECMP_H 2 | #define HEADER_CARES_STRCASECMP_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | 22 | #ifndef HAVE_STRCASECMP 23 | extern int ares_strcasecmp(const char *a, const char *b); 24 | #endif 25 | 26 | #ifndef HAVE_STRNCASECMP 27 | extern int ares_strncasecmp(const char *a, const char *b, size_t n); 28 | #endif 29 | 30 | #endif /* HEADER_CARES_STRCASECMP_H */ 31 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_cxx_demangle.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | dnl Check for all of the headers and libs that Drizzle needs. We check all 7 | dnl of these for plugins too, to ensure that all of the appropriate defines 8 | dnl are set. 9 | 10 | AC_DEFUN([PANDORA_CXX_DEMANGLE],[ 11 | AC_LANG_PUSH([C++]) 12 | save_CXXFLAGS="${CXXFLAGS}" 13 | CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" 14 | AC_CHECK_HEADERS(cxxabi.h) 15 | AC_CACHE_CHECK([checking for abi::__cxa_demangle], pandora_cv_cxa_demangle, 16 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ 17 | char *foo= 0; int bar= 0; 18 | foo= abi::__cxa_demangle(foo, foo, 0, &bar); 19 | ]])],[pandora_cv_cxa_demangle=yes],[pandora_cv_cxa_demangle=no])]) 20 | CXXFLAGS="${save_CXXFLAGS}" 21 | AC_LANG_POP() 22 | 23 | AS_IF([test "x$pandora_cv_cxa_demangle" = xyes],[ 24 | AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1, 25 | [Define to 1 if you have the `abi::__cxa_demangle' function.]) 26 | ]) 27 | ]) 28 | -------------------------------------------------------------------------------- /deps/libdrizzle/README: -------------------------------------------------------------------------------- 1 | 2 | NAME: libdrizzle 3 | 4 | MAINTAINERS: Drizzle Developers 5 | https://launchpad.net/~drizzle-developers 6 | 7 | DESCRIPTION 8 | 9 | This is the the client and protocol library for the Drizzle project. The 10 | server, drizzled, will use this as for protocol library. Client utilities and 11 | any new projects that require low-level protocol communication (like proxies). 12 | Other language interfaces (PHP extensions, Python DBI, Perl DBD, SWIG, ...) 13 | should be built off of this library. 14 | 15 | Project Code and Issue Tracking: 16 | 17 | https://launchpad.net/libdrizzle 18 | 19 | 20 | INSTALLATION: 21 | 22 | Compiling from source: 23 | 24 | $ ./configure && make && make install 25 | 26 | 27 | Ubuntu: 28 | 29 | Packages for Ubuntu are currenlty maintained via the Personal Package Archive 30 | in Launchpad. Information on using the PPA is found at: 31 | 32 | https://launchpad.net/~drizzle-developers/+archive/ppa 33 | 34 | 35 | Fedora/Redhat: 36 | 37 | Packages for Fedora and RHEL are currently maintained unofficially until 38 | approved into the Fedora Package Collection: 39 | 40 | http://5dollarwhitebox.org/repos/drizzle/ 41 | 42 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_use_pipe.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystem 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | dnl 12 | dnl Test if we can Use -pipe to avoid making temp files during the compile. 13 | dnl Should speed up compile on slower disks 14 | 15 | AC_DEFUN([PANDORA_USE_PIPE],[ 16 | 17 | AS_IF([test "$GCC" = "yes"],[ 18 | AC_CACHE_CHECK([for working -pipe], [pandora_cv_use_pipe], [ 19 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 20 | #include 21 | 22 | int main(int argc, char** argv) 23 | { 24 | (void) argc; (void) argv; 25 | return 0; 26 | } 27 | ]])], 28 | [pandora_cv_use_pipe=yes], 29 | [pandora_cv_use_pipe=no]) 30 | ]) 31 | AS_IF([test "$pandora_cv_use_pipe" = "yes"],[ 32 | AM_CFLAGS="-pipe ${AM_CFLAGS}" 33 | AM_CXXFLAGS="-pipe ${AM_CXXFLAGS}" 34 | ]) 35 | ]) 36 | ]) 37 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_writev.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_WRITEV_H 2 | #define HEADER_CARES_WRITEV_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | #include "ares.h" 22 | 23 | #ifndef HAVE_WRITEV 24 | 25 | /* Structure for scatter/gather I/O. */ 26 | struct iovec 27 | { 28 | void *iov_base; /* Pointer to data. */ 29 | size_t iov_len; /* Length of data. */ 30 | }; 31 | 32 | extern ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt); 33 | 34 | #endif 35 | 36 | #endif /* HEADER_CARES_WRITEV_H */ 37 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/inet_net_pton.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARES_INET_NET_PTON_H 2 | #define __ARES_INET_NET_PTON_H 3 | 4 | 5 | /* Copyright (C) 2005 by Daniel Stenberg 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #ifdef HAVE_INET_PTON 21 | #define ares_inet_pton(x,y,z) inet_pton(x,y,z) 22 | #else 23 | int ares_inet_pton(int af, const char *src, void *dst); 24 | #endif 25 | #if defined(HAVE_INET_NET_PTON) && defined(HAVE_INET_NET_PTON_IPV6) 26 | #define ares_inet_net_pton(w,x,y,z) inet_net_pton(w,x,y,z) 27 | #else 28 | int ares_inet_net_pton(int af, const char *src, void *dst, size_t size); 29 | #endif 30 | 31 | #endif /* __ARES_INET_NET_PTON_H */ 32 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_strdup.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | #include "ares_strdup.h" 20 | 21 | #ifndef HAVE_STRDUP 22 | char *ares_strdup(const char *s1) 23 | { 24 | size_t sz; 25 | char * s2; 26 | 27 | if(s1) { 28 | sz = strlen(s1); 29 | if(sz < (size_t)-1) { 30 | sz++; 31 | if(sz < ((size_t)-1) / sizeof(char)) { 32 | s2 = malloc(sz * sizeof(char)); 33 | if(s2) { 34 | memcpy(s2, s1, sz * sizeof(char)); 35 | return s2; 36 | } 37 | } 38 | } 39 | } 40 | return (char *)NULL; 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief System Include Files 14 | */ 15 | 16 | #ifndef __DRIZZLE_COMMON_H 17 | #define __DRIZZLE_COMMON_H 18 | 19 | #include "config.h" 20 | 21 | #include "drizzle_client.h" 22 | #include "drizzle_server.h" 23 | 24 | #ifdef HAVE_ASSERT_H 25 | #include 26 | #endif 27 | #ifdef HAVE_ERRNO_H 28 | #include 29 | #endif 30 | #ifdef HAVE_FCNTL_H 31 | #include 32 | #endif 33 | #ifdef HAVE_NETINET_TCP_H 34 | #include 35 | #endif 36 | #ifdef HAVE_STDARG_H 37 | #include 38 | #endif 39 | #ifdef HAVE_STDIO_H 40 | #include 41 | #endif 42 | #ifdef HAVE_STDLIB_H 43 | #include 44 | #endif 45 | #ifdef HAVE_STRING_H 46 | #include 47 | #endif 48 | #ifdef HAVE_SYS_UIO_H 49 | #include 50 | #endif 51 | #ifdef HAVE_UNISTD_H 52 | #include 53 | #endif 54 | 55 | #include "drizzle_local.h" 56 | #include "conn_local.h" 57 | #include "pack.h" 58 | #include "state.h" 59 | #include "sha1.h" 60 | 61 | #endif /* __DRIZZLE_COMMON_H */ 62 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_swig.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystem 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | AC_DEFUN([PANDORA_SWIG],[ 13 | 14 | AC_PROG_SWIG(1.3.31) 15 | 16 | AC_DEFINE_UNQUOTED([SWIG_TYPE_TABLE], 17 | [$PACKAGE], 18 | [Type Table name for SWIG symbol table]) 19 | 20 | dnl Have to hard-code /usr/local/include and /usr/include into the path. 21 | dnl I hate this. Why is swig sucking me 22 | SWIG="$SWIG \${DEFS} -I\${top_srcdir} -I\${top_builddir} -I/usr/local/include -I/usr/include" 23 | AC_SUBST([SWIG]) 24 | 25 | 26 | ]) 27 | 28 | AC_DEFUN([PANDORA_SWIG_PYTHON3],[ 29 | AC_REQUIRE([PANDORA_SWIG]) 30 | AS_IF([test "x$SWIG" != "x"],[ 31 | AC_CACHE_CHECK([if swig supports Python3], 32 | [ac_cv_swig_has_python3_], 33 | [ 34 | AS_IF([$SWIG -python -help 2>&1 | grep py3 > /dev/null], 35 | [ac_cv_swig_has_python3_=yes], 36 | [ac_cv_swig_has_python3_=no]) 37 | ]) 38 | ]) 39 | ]) 40 | -------------------------------------------------------------------------------- /deps/http_parser/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright 2 | Igor Sysoev. 3 | 4 | Additional changes are licensed under the same terms as NGINX and 5 | copyright Joyent, Inc. and other Node contributors. All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to 9 | deal in the Software without restriction, including without limitation the 10 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_cstdint.m4: -------------------------------------------------------------------------------- 1 | # We check two things: where the include file is for cstdint. We 2 | # include AC_TRY_COMPILE for all the combinations we've seen in the 3 | # wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or 4 | # HAVE_BOOST_CSTDINT depending 5 | # on location. 6 | 7 | AC_DEFUN([PANDORA_CXX_CSTDINT], 8 | [AC_MSG_CHECKING(the location of cstdint) 9 | AC_LANG_PUSH(C++) 10 | save_CXXFLAGS="${CXXFLAGS}" 11 | CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" 12 | ac_cv_cxx_cstdint="" 13 | for location in tr1/cstdint boost/cstdint cstdint; do 14 | if test -z "$ac_cv_cxx_cstdint"; then 15 | AC_TRY_COMPILE([#include <$location>], 16 | [uint32_t t], 17 | [ac_cv_cxx_cstdint="<$location>";]) 18 | fi 19 | done 20 | AC_LANG_POP() 21 | CXXFLAGS="${save_CXXFLAGS}" 22 | if test -n "$ac_cv_cxx_cstdint"; then 23 | AC_MSG_RESULT([$ac_cv_cxx_cstdint]) 24 | else 25 | AC_DEFINE([__STDC_CONSTANT_MACROS],[1],[Use STDC Constant Macros in C++]) 26 | AC_DEFINE([__STDC_FORMAT_MACROS],[1],[Use STDC Format Macros in C++]) 27 | ac_cv_cxx_cstdint="" 28 | AC_MSG_RESULT() 29 | AC_MSG_WARN([Could not find a cstdint header.]) 30 | fi 31 | AC_DEFINE_UNQUOTED(CSTDINT_H,$ac_cv_cxx_cstdint, 32 | [the location of ]) 33 | ]) 34 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_gcc_atomics.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for GCC Atomic Support 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[ 12 | 13 | AC_CACHE_CHECK( 14 | [whether the compiler provides atomic builtins], 15 | [ac_cv_gcc_atomic_builtins], 16 | [AC_LINK_IFELSE( 17 | [AC_LANG_PROGRAM([],[[ 18 | int foo= -10; int bar= 10; 19 | if (!__sync_fetch_and_add(&foo, bar) || foo) 20 | return -1; 21 | bar= __sync_lock_test_and_set(&foo, bar); 22 | if (bar || foo != 10) 23 | return -1; 24 | bar= __sync_val_compare_and_swap(&bar, foo, 15); 25 | if (bar) 26 | return -1; 27 | return 0; 28 | ]])], 29 | [ac_cv_gcc_atomic_builtins=yes], 30 | [ac_cv_gcc_atomic_builtins=no])]) 31 | 32 | AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[ 33 | AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1, 34 | [Define to 1 if compiler provides atomic builtins.]) 35 | ]) 36 | 37 | ]) 38 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libbdb.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBBDB],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for bekerely db 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libbdb], 14 | [AS_HELP_STRING([--disable-libbdb], 15 | [Build with libbdb support @<:@default=on@:>@])], 16 | [ac_enable_libbdb="$enableval"], 17 | [ac_enable_libbdb="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libbdb" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(db,,[ 21 | #include 22 | ],[ 23 | const char *test= DB_VERSION_STRING; 24 | ]) 25 | ],[ 26 | ac_cv_libbdb="no" 27 | ]) 28 | 29 | AM_CONDITIONAL(HAVE_LIBBDB, [test "x${ac_cv_libbdb}" = "xyes"]) 30 | ]) 31 | 32 | AC_DEFUN([PANDORA_HAVE_LIBBDB],[ 33 | AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) 34 | ]) 35 | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[ 37 | AC_REQUIRE([_PANDORA_SEARCH_LIBBDB]) 38 | AS_IF([test "x${ac_cv_libbdb}" = "xno"], 39 | AC_MSG_ERROR([libbdb is required for ${PACKAGE}])) 40 | ]) 41 | -------------------------------------------------------------------------------- /deps/libdrizzle/tests/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Drizzle Client Library 4 | # 5 | # Copyright (C) 2008 Eric Day (eday@oddments.org) 6 | # All rights reserved. 7 | # 8 | # Use and distribution licensed under the BSD license. See 9 | # the COPYING file in this directory for full text. 10 | # 11 | 12 | # Get filename we want to run without path 13 | name=`echo $1 | sed 's/.*\/\([^\/]*\)$/\1/'` 14 | 15 | ext=`echo $name | sed 's/.*\.\([^.]*$\)/\1/'` 16 | if [ "x$ext" = "x$name" ] 17 | then 18 | ext="" 19 | fi 20 | 21 | if [ ! "x$ext" = "xsh" ] 22 | then 23 | libtool_prefix="libtool --mode=execute" 24 | fi 25 | 26 | # Set prefix if it was given through environment 27 | if [ -n "$LIBDRIZZLE_TEST_PREFIX" ] 28 | then 29 | if [ -n "$LIBDRIZZLE_TEST_FILTER" ] 30 | then 31 | # If filter variable is set, only apply prefix to those that match 32 | for x in $LIBDRIZZLE_TEST_FILTER 33 | do 34 | if [ "x$x" = "x$name" ] 35 | then 36 | prefix="$libtool_prefix $LIBDRIZZLE_TEST_PREFIX" 37 | with=" (with prefix after filter)" 38 | break 39 | fi 40 | done 41 | else 42 | prefix="$libtool_prefix $LIBDRIZZLE_TEST_PREFIX" 43 | with=" (with prefix)" 44 | fi 45 | fi 46 | 47 | # Set this to fix broken libtool test 48 | ECHO=`which echo` 49 | export ECHO 50 | 51 | echo 52 | echo "RUN: $name$with" 53 | 54 | (cd tests && $prefix ./$name) 55 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_free_hostent.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | #include 19 | 20 | #ifdef HAVE_NETDB_H 21 | #include 22 | #endif 23 | 24 | #include "ares.h" 25 | #include "ares_private.h" /* for memdebug */ 26 | 27 | void ares_free_hostent(struct hostent *host) 28 | { 29 | char **p; 30 | 31 | free((char *)(host->h_name)); 32 | for (p = host->h_aliases; *p; p++) 33 | free(*p); 34 | free(host->h_aliases); 35 | free(host->h_addr_list[0]); /* no matter if there is one or many entries, 36 | there is only one malloc for all of them */ 37 | free(host->h_addr_list); 38 | free(host); 39 | } 40 | -------------------------------------------------------------------------------- /deps/libuv/test/test-pass-always.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "task.h" 23 | 24 | 25 | TEST_IMPL(pass_always) { 26 | /* This test always passes. It is used to test the test runner. */ 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/result_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Result Declarations for Clients 14 | */ 15 | 16 | #ifndef __DRIZZLE_RESULT_CLIENT_H 17 | #define __DRIZZLE_RESULT_CLIENT_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_result_client Result Declarations for Clients 25 | * @ingroup drizzle_client_interface 26 | * 27 | * These functions read or buffer the result for a client command. 28 | * @{ 29 | */ 30 | 31 | /** 32 | * Read result packet. 33 | */ 34 | DRIZZLE_API 35 | drizzle_result_st *drizzle_result_read(drizzle_con_st *con, 36 | drizzle_result_st *result, 37 | drizzle_return_t *ret_ptr); 38 | 39 | /** 40 | * Buffer all data for a result. 41 | */ 42 | DRIZZLE_API 43 | drizzle_return_t drizzle_result_buffer(drizzle_result_st *result); 44 | 45 | /** 46 | * Get result row packet size. 47 | */ 48 | DRIZZLE_API 49 | size_t drizzle_result_row_size(drizzle_result_st *result); 50 | 51 | /** @} */ 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif /* __DRIZZLE_RESULT_CLIENT_H */ 58 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_cinttypes.m4: -------------------------------------------------------------------------------- 1 | # We check two things: where the include file is for cinttypes. We 2 | # include AC_TRY_COMPILE for all the combinations we've seen in the 3 | # wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or 4 | # HAVE_BOOST_CINTTYPES depending 5 | # on location. 6 | 7 | AC_DEFUN([PANDORA_CXX_CINTTYPES], 8 | [AC_REQUIRE([PANDORA_CXX_CSTDINT]) 9 | AC_MSG_CHECKING(the location of cinttypes) 10 | AC_LANG_PUSH(C++) 11 | save_CXXFLAGS="${CXXFLAGS}" 12 | CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" 13 | ac_cv_cxx_cinttypes="" 14 | for location in tr1/cinttypes boost/cinttypes cinttypes; do 15 | if test -z "$ac_cv_cxx_cinttypes"; then 16 | AC_TRY_COMPILE([#include $ac_cv_cxx_cstdint; 17 | #include <$location>], 18 | [uint32_t foo= UINT32_C(1)], 19 | [ac_cv_cxx_cinttypes="<$location>";]) 20 | fi 21 | done 22 | AC_LANG_POP() 23 | CXXFLAGS="${save_CXXFLAGS}" 24 | if test -n "$ac_cv_cxx_cinttypes"; then 25 | AC_MSG_RESULT([$ac_cv_cxx_cinttypes]) 26 | else 27 | ac_cv_cxx_cinttypes="" 28 | AC_MSG_RESULT() 29 | AC_MSG_WARN([Could not find a cinttypes header.]) 30 | fi 31 | AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++]) 32 | AC_DEFINE_UNQUOTED(CINTTYPES_H,$ac_cv_cxx_cinttypes, 33 | [the location of ]) 34 | ]) 35 | -------------------------------------------------------------------------------- /tools/gyp/PRESUBMIT.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | 6 | """Top-level presubmit script for GYP. 7 | 8 | See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 9 | for more details about the presubmit API built into gcl. 10 | """ 11 | 12 | 13 | def CheckChangeOnUpload(input_api, output_api): 14 | report = [] 15 | report.extend(input_api.canned_checks.PanProjectChecks( 16 | input_api, output_api)) 17 | return report 18 | 19 | 20 | def CheckChangeOnCommit(input_api, output_api): 21 | report = [] 22 | license = ( 23 | r'.*? Copyright \(c\) %(year)s Google Inc\. All rights reserved\.\n' 24 | r'.*? Use of this source code is governed by a BSD-style license that ' 25 | r'can be\n' 26 | r'.*? found in the LICENSE file\.\n' 27 | ) % { 28 | 'year': input_api.time.strftime('%Y'), 29 | } 30 | 31 | report.extend(input_api.canned_checks.PanProjectChecks( 32 | input_api, output_api, license_header=license)) 33 | report.extend(input_api.canned_checks.CheckTreeIsOpen( 34 | input_api, output_api, 35 | 'http://gyp-status.appspot.com/status', 36 | 'http://gyp-status.appspot.com/current')) 37 | return report 38 | 39 | 40 | def GetPreferredTrySlaves(): 41 | return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac'] 42 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_python.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystems 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | 13 | AC_DEFUN([PANDORA_WITH_PYTHON], [ 14 | 15 | AC_ARG_WITH([python], 16 | [AS_HELP_STRING([--with-python], 17 | [Build Python Bindings @<:@default=yes@:>@])], 18 | [with_python=$withval 19 | python_requested=$withval 20 | ], 21 | [with_python=yes 22 | python_requested=no 23 | ]) 24 | 25 | AS_IF([test "x$with_python" != "xno"],[ 26 | AS_IF([test "x$with_python" != "xyes"],[PYTHON=$with_python]) 27 | AM_PATH_PYTHON([2.4],,[with_python="no"]) 28 | AC_PYTHON_DEVEL() 29 | AS_IF([test "x$pythonexists" = "xno"],[with_python="no"]) 30 | ]) 31 | AS_IF([test "x$with_python" = "xno" -a "$python_requested" = "yes"],[ 32 | AC_MSG_ERROR([Python support was explicity requested, but Python support 33 | was not found. Please correct your build environment and try 34 | again]) 35 | ]) 36 | AM_CONDITIONAL(BUILD_PYTHON, [test "$with_python" = "yes"]) 37 | ]) 38 | -------------------------------------------------------------------------------- /deps/libuv/include/uv-private/uv-linux.h: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef UV_LINUX_H 23 | #define UV_LINUX_H 24 | 25 | #define UV_FS_EVENT_PRIVATE_FIELDS \ 26 | ev_io read_watcher; \ 27 | uv_fs_event_cb cb; \ 28 | 29 | #endif /* UV_LINUX_H */ 30 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_innodb.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBINNODB],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libinnodb 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libinnodb], 14 | [AS_HELP_STRING([--disable-libinnodb], 15 | [Build with libinnodb support @<:@default=on@:>@])], 16 | [ac_enable_libinnodb="$enableval"], 17 | [ac_enable_libinnodb="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(innodb,,[ 21 | #include 22 | ],[ 23 | ib_u64_t 24 | ib_api_version(void); 25 | ]) 26 | ],[ 27 | ac_cv_libinnodb="no" 28 | ]) 29 | 30 | AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"]) 31 | ]) 32 | 33 | AC_DEFUN([PANDORA_HAVE_LIBINNODB],[ 34 | AC_REQUIRE([_PANDORA_SEARCH_LIBINNODB]) 35 | ]) 36 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[ 38 | AC_REQUIRE([PANDORA_HAVE_LIBINNODB]) 39 | AS_IF([test "x${ac_cv_libinnodb}" = "xno"], 40 | AC_MSG_ERROR([libinnodb is required for ${PACKAGE}])) 41 | ]) 42 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libpqxx.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Padraig O'Sullivan 2 | dnl This file is free software; 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libpqxx 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libpqxx], 14 | [AS_HELP_STRING([--disable-libpqxx], 15 | [Build with libpqxx support @<:@default=on@:>@])], 16 | [ac_enable_libpqxx="$enableval"], 17 | [ac_enable_libpqxx="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[ 20 | AC_LANG_PUSH([C++]) 21 | AC_LIB_HAVE_LINKFLAGS(pqxx,,[ 22 | #include 23 | ],[ 24 | pqxx::connection conn("dbname=test"); 25 | ]) 26 | AC_LANG_POP() 27 | ],[ 28 | ac_cv_libpqxx="no" 29 | ]) 30 | 31 | AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"]) 32 | 33 | ]) 34 | 35 | AC_DEFUN([PANDORA_HAVE_LIBPQXX],[ 36 | AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX]) 37 | ]) 38 | 39 | AC_DEFUN([PANDORA_REQUIRE_LIBPQXX],[ 40 | AC_REQUIRE([PANDORA_HAVE_LIBPQXX]) 41 | AS_IF([test "x$ac_cv_libpqxx" = "xno"],[ 42 | AC_MSG_ERROR([libpqxx is required for ${PACKAGE}]) 43 | ]) 44 | ]) 45 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_thrift.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Padraig O'Sullivan 2 | dnl This file is free software; Padraig O'Sullivan 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_THRIFT],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for thrift 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([thrift], 14 | [AS_HELP_STRING([--disable-thrift], 15 | [Build with thrift support @<:@default=on@:>@])], 16 | [ac_enable_thrift="$enableval"], 17 | [ac_enable_thrift="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_thrift" = "xyes"],[ 20 | AC_LANG_PUSH(C++) 21 | AC_LIB_HAVE_LINKFLAGS(thrift,,[ 22 | #include 23 | ],[ 24 | apache::thrift::TOutput test_output; 25 | ]) 26 | AC_LANG_POP() 27 | ],[ 28 | ac_cv_thrift="no" 29 | ]) 30 | 31 | AM_CONDITIONAL(HAVE_THRIFT, [test "x${ac_cv_thrift}" = "xyes"]) 32 | 33 | ]) 34 | 35 | AC_DEFUN([PANDORA_HAVE_THRIFT],[ 36 | AC_REQUIRE([_PANDORA_SEARCH_THRIFT]) 37 | ]) 38 | 39 | AC_DEFUN([PANDORA_REQUIRE_THRIFT],[ 40 | AC_REQUIRE([PANDORA_HAVE_THRIFT]) 41 | AS_IF([test x$ac_cv_thrift= xno],[ 42 | AC_MSG_ERROR([thrift required for ${PACKAGE}]) 43 | ]) 44 | ]) 45 | 46 | -------------------------------------------------------------------------------- /deps/libuv/test/test-fail-always.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "task.h" 23 | 24 | 25 | TEST_IMPL(fail_always) { 26 | /* This test always fails. It is used to test the test runner. */ 27 | FATAL("Yes, it always fails"); 28 | return 2; 29 | } 30 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libvbucket.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 NorthScale 2 | dnl This file is free software; NorthScale 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBVBUCKET],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libvbucket 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libvbucket], 14 | [AS_HELP_STRING([--disable-libvbucket], 15 | [Build with libvbucket support @<:@default=on@:>@])], 16 | [ac_enable_libvbucket="$enableval"], 17 | [ac_enable_libvbucket="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libvbucket" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(vbucket,,[ 21 | #include 22 | ],[ 23 | VBUCKET_CONFIG_HANDLE config = vbucket_config_parse_file(NULL); 24 | ]) 25 | ],[ 26 | ac_cv_libvbucket="no" 27 | ]) 28 | 29 | AM_CONDITIONAL(HAVE_LIBVBUCKET, [test "x${ac_cv_libvbucket}" = "xyes"]) 30 | ]) 31 | 32 | AC_DEFUN([PANDORA_HAVE_LIBVBUCKET],[ 33 | AC_REQUIRE([_PANDORA_SEARCH_LIBVBUCKET]) 34 | ]) 35 | 36 | AC_DEFUN([PANDORA_REQUIRE_LIBVBUCKET],[ 37 | AC_REQUIRE([PANDORA_HAVE_LIBVBUCKET]) 38 | AS_IF([test x$ac_cv_libvbucket = xno], 39 | AC_MSG_ERROR([libvbucket is required for ${PACKAGE}])) 40 | ]) 41 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libgtest.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Monty Taylor 2 | dnl This file is free software; Monty Taylor 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libgtest 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libgtest], 14 | [AS_HELP_STRING([--disable-libgtest], 15 | [Build with libgtest support @<:@default=on@:>@])], 16 | [ac_enable_libgtest="$enableval"], 17 | [ac_enable_libgtest="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libgtest" = "xyes"],[ 20 | AC_LANG_PUSH(C++) 21 | AC_LIB_HAVE_LINKFLAGS(gtest,,[ 22 | #include 23 | TEST(pandora_test_libgtest, PandoraTest) 24 | { 25 | ASSERT_EQ(1, 1); 26 | } 27 | ],[]) 28 | AC_LANG_POP() 29 | ],[ 30 | ac_cv_libgtest="no" 31 | ]) 32 | 33 | AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"]) 34 | ]) 35 | 36 | AC_DEFUN([PANDORA_HAVE_LIBGTEST],[ 37 | AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST]) 38 | ]) 39 | 40 | AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[ 41 | AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST]) 42 | AS_IF([test "x${ac_cv_libgtest}" = "xno"], 43 | AC_MSG_ERROR([libgtest is required for ${PACKAGE}])) 44 | ]) 45 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libsqlite3.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBSQLITE3],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libsqlite3 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libsqlite3], 14 | [AS_HELP_STRING([--disable-libsqlite3], 15 | [Build with libsqlite3 support @<:@default=on@:>@])], 16 | [ac_enable_libsqlite3="$enableval"], 17 | [ac_enable_libsqlite3="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libsqlite3" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(sqlite3,,[ 21 | #include 22 | #include 23 | ],[ 24 | sqlite3 *db; 25 | sqlite3_open(NULL, &db); 26 | ]) 27 | ],[ 28 | ac_cv_libsqlite3="no" 29 | ]) 30 | 31 | AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"]) 32 | ]) 33 | 34 | AC_DEFUN([PANDORA_HAVE_LIBSQLITE3],[ 35 | AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3]) 36 | ]) 37 | 38 | AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[ 39 | AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3]) 40 | AS_IF([test "x${ac_cv_libsqlite3}" = "xno"], 41 | AC_MSG_ERROR([libsqlite3 is required for ${PACKAGE}])) 42 | ]) 43 | -------------------------------------------------------------------------------- /deps/libdrizzle/tests/drizzle_query_st.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief drizzle_query_st tests 14 | */ 15 | 16 | #include "tests/common.h" 17 | 18 | int main(void) 19 | { 20 | drizzle_st *drizzle; 21 | drizzle_query_st *query; 22 | drizzle_query_st query_buffer; 23 | size_t size; 24 | 25 | printf("sizeof(drizzle_query_st) = %zu\n", sizeof(drizzle_query_st)); 26 | 27 | if ((drizzle= drizzle_create(NULL)) == NULL) 28 | drizzle_test_error("drizzle_create"); 29 | 30 | if ((query= drizzle_query_create(drizzle, &query_buffer)) == NULL) 31 | drizzle_test_error("drizzle_query_create"); 32 | drizzle_query_free(query); 33 | 34 | if ((query= drizzle_query_create(drizzle, NULL)) == NULL) 35 | drizzle_test_error("drizzle_query_create"); 36 | 37 | if (drizzle_query_options(query) != DRIZZLE_QUERY_ALLOCATED) 38 | drizzle_test_error("drizzle_query_options"); 39 | 40 | drizzle_query_set_string(query, "SELECT 1+1", 10); 41 | 42 | if (strncmp(drizzle_query_string(query, &size), "SELECT 1+1", 10) || 43 | size != 10) 44 | { 45 | drizzle_test_error("drizzle_query_string"); 46 | } 47 | 48 | drizzle_query_free(query); 49 | drizzle_free(drizzle); 50 | 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libhashkit.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 NorthScale 2 | dnl This file is free software; NorthScale 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libhashkit 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libhashkit], 14 | [AS_HELP_STRING([--disable-libhashkit], 15 | [Build with libhashkit support @<:@default=on@:>@])], 16 | [ac_enable_libhashkit="$enableval"], 17 | [ac_enable_libhashkit="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(hashkit,,[ 21 | #include 22 | ],[ 23 | hashkit_st foo; 24 | hashkit_st *kit = hashkit_create(&foo); 25 | hashkit_free(kit); 26 | ]) 27 | ],[ 28 | ac_cv_libhashkit="no" 29 | ]) 30 | 31 | AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"]) 32 | ]) 33 | 34 | AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[ 35 | AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT]) 36 | ]) 37 | 38 | AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[ 39 | AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT]) 40 | AS_IF([test x$ac_cv_libhashkit = xno], 41 | AC_MSG_ERROR([libhashkit is required for ${PACKAGE}])) 42 | ]) 43 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libz.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for libz 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBZ],[ 12 | AC_REQUIRE([AC_LIB_PREFIX]) 13 | 14 | AC_LIB_HAVE_LINKFLAGS(z,, 15 | [ 16 | #include 17 | ],[ 18 | crc32(0, Z_NULL, 0); 19 | ]) 20 | 21 | AM_CONDITIONAL(HAVE_LIBZ, [test "x${ac_cv_libz}" = "xyes"]) 22 | ]) 23 | 24 | AC_DEFUN([_PANDORA_HAVE_LIBZ],[ 25 | 26 | AC_ARG_ENABLE([libz], 27 | [AS_HELP_STRING([--disable-libz], 28 | [Build with libz support @<:@default=on@:>@])], 29 | [ac_enable_libz="$enableval"], 30 | [ac_enable_libz="yes"]) 31 | 32 | _PANDORA_SEARCH_LIBZ 33 | ]) 34 | 35 | 36 | AC_DEFUN([PANDORA_HAVE_LIBZ],[ 37 | AC_REQUIRE([_PANDORA_HAVE_LIBZ]) 38 | ]) 39 | 40 | AC_DEFUN([_PANDORA_REQUIRE_LIBZ],[ 41 | ac_enable_libz="yes" 42 | _PANDORA_SEARCH_LIBZ 43 | 44 | AS_IF([test x$ac_cv_libz = xno],[ 45 | AC_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.]) 46 | ]) 47 | ]) 48 | 49 | AC_DEFUN([PANDORA_REQUIRE_LIBZ],[ 50 | AC_REQUIRE([_PANDORA_REQUIRE_LIBZ]) 51 | ]) 52 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libavahi.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libavahi 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libavahi], 14 | [AS_HELP_STRING([--disable-libavahi], 15 | [Build with libavahi support @<:@default=on@:>@])], 16 | [ac_enable_libavahi="$enableval"], 17 | [ac_enable_libavahi="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libavahi" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[ 21 | #include 22 | #include 23 | ],[ 24 | AvahiSimplePoll *simple_poll= avahi_simple_poll_new(); 25 | ]) 26 | ],[ 27 | ac_cv_libavahi="no" 28 | ]) 29 | 30 | AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"]) 31 | ]) 32 | 33 | AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[ 34 | AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) 35 | ]) 36 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[ 38 | AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI]) 39 | AS_IF([test "x${ac_cv_libavahi}" = "xno"], 40 | AC_MSG_ERROR([libavahi is required for ${PACKAGE}])) 41 | ]) 42 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libpq.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBPQ],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libpq 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libpq], 14 | [AS_HELP_STRING([--disable-libpq], 15 | [Build with libpq support @<:@default=on@:>@])], 16 | [ac_enable_libpq="$enableval"], 17 | [ac_enable_libpq="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libpq" = "xyes"],[ 20 | AC_CHECK_HEADERS([libpq-fe.h]) 21 | AC_LIB_HAVE_LINKFLAGS(pq,,[ 22 | #ifdef HAVE_LIBPQ_FE_H 23 | # include 24 | #else 25 | # include 26 | #endif 27 | ], [ 28 | PGconn *conn; 29 | conn = PQconnectdb(NULL); 30 | ]) 31 | ],[ 32 | ac_cv_libpq="no" 33 | ]) 34 | 35 | AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"]) 36 | ]) 37 | 38 | AC_DEFUN([PANDORA_HAVE_LIBPQ],[ 39 | AC_REQUIRE([_PANDORA_SEARCH_LIBPQ]) 40 | ]) 41 | 42 | AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[ 43 | AC_REQUIRE([PANDORA_HAVE_LIBPQ]) 44 | AS_IF([test "x${ac_cv_libpq}" = "xno"], 45 | AC_MSG_ERROR([libpq is required for ${PACKAGE}])) 46 | ]) 47 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_memcached.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[ 7 | 8 | AC_ARG_WITH([memcached], 9 | [AS_HELP_STRING([--with-memcached], 10 | [Memcached binary to use for make test])], 11 | [ac_cv_with_memcached="$withval"], 12 | [ac_cv_with_memcached=memcached]) 13 | 14 | # just ignore the user if --without-memcached is passed.. it is 15 | # only used by make test 16 | AS_IF([test "x$ac_cv_with_memcached" = "xno"],[ 17 | ac_cv_with_memcached=memcached 18 | MEMCACHED_BINARY=memcached 19 | ],[ 20 | AS_IF([test -f "$ac_cv_with_memcached"],[ 21 | MEMCACHED_BINARY=$ac_cv_with_memcached 22 | ],[ 23 | AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no") 24 | ]) 25 | ]) 26 | AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", 27 | [Name of the memcached binary used in make test]) 28 | AM_CONDITIONAL([HAVE_MEMCACHED],[test "x$MEMCACHED_BINARY" != "xno"]) 29 | ]) 30 | 31 | AC_DEFUN([PANDORA_HAVE_MEMCACHED],[ 32 | AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED]) 33 | ]) 34 | 35 | AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[ 36 | AC_REQUIRE([PANDORA_HAVE_MEMCACHED]) 37 | AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[ 38 | AC_MSG_ERROR(["could not find memcached binary"]) 39 | ]) 40 | ]) 41 | 42 | -------------------------------------------------------------------------------- /phode.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'includes': [ 3 | './common.gypi', 4 | './local.gypi', 5 | ], 6 | 7 | 'targets': [ 8 | { 9 | 'target_name': 'phode', 10 | 'type': 'shared_library', 11 | 12 | 'defines': [ 13 | # TODO: move to local.gypi 14 | 'ZTS=1', 15 | 'ZEND_DEBUG=1', 16 | 'PHP_DEBUG=1', 17 | ], 18 | 19 | 'dependencies': [ 20 | 'deps/http_parser/http_parser.gyp:http_parser', 21 | 'deps/libuv/uv.gyp:uv', 22 | ], 23 | 24 | 'include_dirs': [ 25 | 'src', 26 | 'deps/uv/src/ares', 27 | '<(PHP_INCLUDE_PATH)', 28 | '<(PHP_INCLUDE_PATH)/main', 29 | '<(PHP_INCLUDE_PATH)/TSRM', 30 | '<(PHP_INCLUDE_PATH)/Zend', 31 | ], 32 | 33 | 'sources': [ 34 | 'src/ext.c', 35 | 'test.php', 36 | 'gen.bat', 37 | ], 38 | 39 | 'conditions': [ 40 | [ 'OS=="win"', { 41 | 'defines': [ 42 | 'ZEND_WIN32=1', 43 | 'PHP_WIN32=1', 44 | 'ZEND_WIN32=1', 45 | 'PHP_WIN32=1', 46 | ], 47 | 'libraries': [ 48 | # TODO: move to local.gypi 49 | '-l../php/Debug_TS/php5ts_debug.lib' 50 | ] 51 | }], 52 | [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 53 | 'cflags': [ 54 | '-std=c99', 55 | '-fPIC', 56 | ], 57 | }], 58 | ], 59 | } 60 | ] # end targets 61 | } 62 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libgearman.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBGEARMAN],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libgearman 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libgearman], 14 | [AS_HELP_STRING([--disable-libgearman], 15 | [Build with libgearman support @<:@default=on@:>@])], 16 | [ac_enable_libgearman="$enableval"], 17 | [ac_enable_libgearman="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libgearman" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(gearman,,[ 21 | #include 22 | ],[ 23 | gearman_client_st gearman_client; 24 | gearman_client_context(&gearman_client); 25 | ]) 26 | ],[ 27 | ac_cv_libgearman="no" 28 | ]) 29 | 30 | AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"]) 31 | ]) 32 | 33 | AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[ 34 | AC_REQUIRE([_PANDORA_SEARCH_LIBGEARMAN]) 35 | ]) 36 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ 38 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) 39 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], 40 | AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}])) 41 | ]) 42 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_library_init.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_LIBRARY_INIT_H 2 | #define HEADER_CARES_LIBRARY_INIT_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * Copyright (C) 2004-2009 by Daniel Stenberg 7 | * 8 | * Permission to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose and without 10 | * fee is hereby granted, provided that the above copyright 11 | * notice appear in all copies and that both that copyright 12 | * notice and this permission notice appear in supporting 13 | * documentation, and that the name of M.I.T. not be used in 14 | * advertising or publicity pertaining to distribution of the 15 | * software without specific, written prior permission. 16 | * M.I.T. makes no representations about the suitability of 17 | * this software for any purpose. It is provided "as is" 18 | * without express or implied warranty. 19 | */ 20 | 21 | #include "ares_setup.h" 22 | 23 | #ifdef USE_WINSOCK 24 | 25 | #include 26 | 27 | typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*); 28 | typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG); 29 | 30 | /* Forward-declaration of variables defined in ares_library_init.c */ 31 | /* that are global and unique instances for whole c-ares library. */ 32 | 33 | extern fpGetNetworkParams_t ares_fpGetNetworkParams; 34 | extern fpSystemFunction036_t ares_fpSystemFunction036; 35 | 36 | #endif /* USE_WINSOCK */ 37 | 38 | #endif /* HEADER_CARES_LIBRARY_INIT_H */ 39 | 40 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_llist.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARES_LLIST_H 2 | #define __ARES_LLIST_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | 21 | /* Node definition for circular, doubly-linked list */ 22 | struct list_node { 23 | struct list_node *prev; 24 | struct list_node *next; 25 | void* data; 26 | }; 27 | 28 | void ares__init_list_head(struct list_node* head); 29 | 30 | void ares__init_list_node(struct list_node* node, void* d); 31 | 32 | int ares__is_list_empty(struct list_node* head); 33 | 34 | void ares__insert_in_list(struct list_node* new_node, 35 | struct list_node* old_node); 36 | 37 | void ares__remove_from_list(struct list_node* node); 38 | 39 | void ares__swap_lists(struct list_node* head_a, 40 | struct list_node* head_b); 41 | 42 | #endif /* __ARES_LLIST_H */ 43 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/get_ver.awk: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * Project: c-ares 3 | # * 4 | # *************************************************************************** 5 | # awk script which fetches c-ares version number and string from input 6 | # file and writes them to STDOUT. Here you can get an awk version for Win32: 7 | # http://www.gknw.net/development/prgtools/awk-20070501.zip 8 | # 9 | BEGIN { 10 | if (match (ARGV[1], /ares_version.h/)) { 11 | while ((getline < ARGV[1]) > 0) { 12 | if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) { 13 | libcares_copyright_str = substr($0, 25, length($0)-25); 14 | } 15 | else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) { 16 | libcares_ver_str = substr($3, 2, length($3)-2); 17 | } 18 | else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) { 19 | libcares_ver_major = substr($3, 1, length($3)); 20 | } 21 | else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) { 22 | libcares_ver_minor = substr($3, 1, length($3)); 23 | } 24 | else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) { 25 | libcares_ver_patch = substr($3, 1, length($3)); 26 | } 27 | } 28 | libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch; 29 | print "LIBCARES_VERSION = " libcares_ver ""; 30 | print "LIBCARES_VERSION_STR = " libcares_ver_str ""; 31 | print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str ""; 32 | } 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libdl.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for libdl 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBDL],[ 12 | 13 | save_LIBS="$LIBS" 14 | LIBS="" 15 | AC_CHECK_LIB(dl,dlopen) 16 | AC_CHECK_FUNCS(dlopen) 17 | LIBDL_LIBS="$LIBS" 18 | LIBS="${save_LIBS}" 19 | AC_SUBST(LIBDL_LIBS) 20 | 21 | AM_CONDITIONAL(HAVE_LIBDL, [test "x${ac_cv_func_dlopen}" = "xyes"]) 22 | ]) 23 | 24 | AC_DEFUN([_PANDORA_HAVE_LIBDL],[ 25 | 26 | AC_ARG_ENABLE([libdl], 27 | [AS_HELP_STRING([--disable-libdl], 28 | [Build with libdl support @<:@default=on@:>@])], 29 | [ac_enable_libdl="$enableval"], 30 | [ac_enable_libdl="yes"]) 31 | 32 | _PANDORA_SEARCH_LIBDL 33 | ]) 34 | 35 | 36 | AC_DEFUN([PANDORA_HAVE_LIBDL],[ 37 | AC_REQUIRE([_PANDORA_HAVE_LIBDL]) 38 | ]) 39 | 40 | AC_DEFUN([_PANDORA_REQUIRE_LIBDL],[ 41 | ac_enable_libdl="yes" 42 | _PANDORA_SEARCH_LIBDL 43 | 44 | AS_IF([test "$ac_cv_func_dlopen" != "yes"],[ 45 | AC_MSG_ERROR([libdl/dlopen() is required for ${PACKAGE}. On Debian this can be found in libc6-dev. On RedHat this can be found in glibc-devel.]) 46 | ]) 47 | ]) 48 | 49 | AC_DEFUN([PANDORA_REQUIRE_LIBDL],[ 50 | AC_REQUIRE([_PANDORA_REQUIRE_LIBDL]) 51 | ]) 52 | -------------------------------------------------------------------------------- /deps/libuv/test/runner-unix.h: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef TEST_RUNNER_UNIX_H 23 | #define TEST_RUNNER_UNIX_H 24 | 25 | #include 26 | #include /* FILE */ 27 | 28 | typedef struct { 29 | FILE* stdout_file; 30 | pid_t pid; 31 | char* name; 32 | int status; 33 | int terminated; 34 | } process_info_t; 35 | 36 | #endif /* TEST_RUNNER_UNIX_H */ 37 | -------------------------------------------------------------------------------- /tools/gyp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Google Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /deps/libdrizzle/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2008 Eric Day (eday@oddments.org) 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following disclaimer 13 | in the documentation and/or other materials provided with the 14 | distribution. 15 | 16 | * The names of its contributors may not be used to endorse or 17 | promote products derived from this software without specific prior 18 | written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libcassandra.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Padraig O'Sullivan 2 | dnl This file is free software; 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBCASSANDRA],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libcassandra 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libcassandra], 14 | [AS_HELP_STRING([--disable-libcassandra], 15 | [Build with libcassandra support @<:@default=on@:>@])], 16 | [ac_enable_libcassandra="$enableval"], 17 | [ac_enable_libcassandra="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libcassandra" = "xyes"],[ 20 | AC_LANG_PUSH([C++]) 21 | AC_LIB_HAVE_LINKFLAGS(cassandra,[thrift],[ 22 | #include 23 | ],[ 24 | libcassandra::CassandraFactory fact("localhost", 9306); 25 | ]) 26 | AC_LANG_POP() 27 | ],[ 28 | ac_cv_libcassandra="no" 29 | ]) 30 | 31 | AM_CONDITIONAL(HAVE_LIBCASSANDRA, [test "x${ac_cv_libcassandra}" = "xyes"]) 32 | 33 | ]) 34 | 35 | AC_DEFUN([PANDORA_HAVE_LIBCASSANDRA],[ 36 | AC_REQUIRE([_PANDORA_SEARCH_LIBCASSANDRA]) 37 | ]) 38 | 39 | AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[ 40 | AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA]) 41 | AS_IF([test "x$ac_cv_libcassandra" = "xno"],[ 42 | AC_MSG_ERROR([libcassandra is required for ${PACKAGE}]) 43 | ]) 44 | ]) 45 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/ev/libev.m4: -------------------------------------------------------------------------------- 1 | dnl this file is part of libev, do not make local modifications 2 | dnl http://software.schmorp.de/pkg/libev 3 | 4 | dnl libev support 5 | AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h) 6 | 7 | AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd) 8 | 9 | AC_CHECK_FUNCS(clock_gettime, [], [ 10 | dnl on linux, try syscall wrapper first 11 | if test $(uname) = Linux; then 12 | AC_MSG_CHECKING(for clock_gettime syscall) 13 | AC_LINK_IFELSE([AC_LANG_PROGRAM( 14 | [#include 15 | #include 16 | #include ], 17 | [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])], 18 | [ac_have_clock_syscall=1 19 | AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, "use syscall interface for clock_gettime") 20 | AC_MSG_RESULT(yes)], 21 | [AC_MSG_RESULT(no)]) 22 | fi 23 | if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then 24 | AC_CHECK_LIB(rt, clock_gettime) 25 | unset ac_cv_func_clock_gettime 26 | AC_CHECK_FUNCS(clock_gettime) 27 | fi 28 | ]) 29 | 30 | AC_CHECK_FUNCS(nanosleep, [], [ 31 | if test -z "$LIBEV_M4_AVOID_LIBRT"; then 32 | AC_CHECK_LIB(rt, nanosleep) 33 | unset ac_cv_func_nanosleep 34 | AC_CHECK_FUNCS(nanosleep) 35 | fi 36 | ]) 37 | 38 | AC_CHECK_LIB(m, ceil) 39 | 40 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libboost_thread.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Monty Taylor 2 | dnl This file is free software; Monty Taylor 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_THREAD],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for boost::thread 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_LANG_PUSH(C++) 14 | AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,,[ 15 | #include 16 | ],[ 17 | boost::thread id; 18 | ]) 19 | AS_IF([test "x${ac_cv_libboost_thread_mt}" = "xno"],[ 20 | AC_LIB_HAVE_LINKFLAGS(boost_thread,,[ 21 | #include 22 | ],[ 23 | boost::thread id; 24 | ]) 25 | ]) 26 | AC_LANG_POP() 27 | 28 | AM_CONDITIONAL(HAVE_BOOST_THREAD, 29 | [test "x${ac_cv_libboost_thread}" = "xyes" -o "x${ac_cv_libboost_thread_mt}" = "xyes"]) 30 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_THREAD_MT} ${LTLIBBOOST_THREAD}" 31 | AC_SUBST(BOOST_LIBS) 32 | ]) 33 | 34 | AC_DEFUN([PANDORA_HAVE_BOOST_THREAD],[ 35 | PANDORA_HAVE_BOOST($1) 36 | _PANDORA_SEARCH_BOOST_THREAD($1) 37 | ]) 38 | 39 | AC_DEFUN([PANDORA_REQUIRE_BOOST_THREAD],[ 40 | PANDORA_REQUIRE_BOOST($1) 41 | _PANDORA_SEARCH_BOOST_THREAD($1) 42 | AS_IF([test "x${ac_cv_libboost_thread}" = "xno" -a "x${ac_cv_libboost_thread_mt}" = "xno"], 43 | AC_MSG_ERROR([boost::thread is required for ${PACKAGE}])) 44 | ]) 45 | 46 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/handshake_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Handshake Declarations for Servers 14 | */ 15 | 16 | #ifndef __DRIZZLE_HANDSHAKE_SERVER_H 17 | #define __DRIZZLE_HANDSHAKE_SERVER_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_handshake_server Handshake Declarations for Servers 25 | * @ingroup drizzle_server_interface 26 | * 27 | * These functions are used to send and receive handshake packets in a server. 28 | * @{ 29 | */ 30 | 31 | /** 32 | * Write server handshake packet to a client. 33 | * 34 | * @param[in] con Connection structure previously initialized with 35 | * drizzle_con_create(), drizzle_con_clone(), or related functions. 36 | * @return Standard drizzle return value. 37 | */ 38 | DRIZZLE_API 39 | drizzle_return_t drizzle_handshake_server_write(drizzle_con_st *con); 40 | 41 | /** 42 | * Read handshake packet from the client in a server. 43 | * 44 | * @param[in] con Connection structure previously initialized with 45 | * drizzle_con_create(), drizzle_con_clone(), or related functions. 46 | * @return Standard drizzle return value. 47 | */ 48 | DRIZZLE_API 49 | drizzle_return_t drizzle_handshake_client_read(drizzle_con_st *con); 50 | 51 | /** @} */ 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif /* __DRIZZLE_HANDSHAKE_SERVER_H */ 58 | -------------------------------------------------------------------------------- /deps/libdrizzle/prototest/drizzle_flood: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Drizzle Client & Protocol Library 4 | # 5 | # Copyright (C) 2008-2010 Eric Day (eday@oddments.org) 6 | # All rights reserved. 7 | # 8 | # Use and distribution licensed under the BSD license. See 9 | # the COPYING file in this directory for full text. 10 | # 11 | ''' 12 | Send an infinite amount of data to a MySQL server. 13 | ''' 14 | 15 | import optparse 16 | import sys 17 | import socket 18 | 19 | parser = optparse.OptionParser(add_help_option=False) 20 | 21 | parser.add_option("--help", action="help", help="Print out help details") 22 | parser.add_option("-h", "--host", dest="host", default="localhost", 23 | help="Host or IP to test", metavar="HOST") 24 | parser.add_option("-p", "--port", dest="port", default=3306, 25 | help="Port to test", metavar="PORT") 26 | 27 | (options, args) = parser.parse_args() 28 | 29 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 30 | s.connect((options.host, int(options.port))) 31 | print 'Connected to %s:%s' % (options.host, options.port) 32 | 33 | server_header = s.recv(1024) 34 | print 'Server Header:' 35 | print list(server_header) 36 | 37 | print 38 | print 'Each . represents 16MB of data:' 39 | 40 | # Max packet size plus sequence number '1'. 41 | packet = '\xFF\xFF\xFF\x01' 42 | data = 'x' * 8192 43 | 44 | # Keep sending max size packets, causes infinite loop in my_net_skip_rest. 45 | while True: 46 | s.send(packet) 47 | 48 | # Send 16777215 bytes. 49 | for x in range(0, 2047): 50 | s.send(data) 51 | s.send(data[1:]) 52 | 53 | sys.stdout.write('.') 54 | sys.stdout.flush() 55 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/conn_uds.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Connection Definitions for Unix Domain Sockets 14 | */ 15 | 16 | #include "common.h" 17 | 18 | const char *drizzle_con_uds(const drizzle_con_st *con) 19 | { 20 | if (con->socket_type == DRIZZLE_CON_SOCKET_UDS) 21 | { 22 | if (con->socket.uds.sockaddr.sun_path[0] != 0) 23 | return con->socket.uds.sockaddr.sun_path; 24 | 25 | if (con->options & DRIZZLE_CON_MYSQL) 26 | return DRIZZLE_DEFAULT_UDS_MYSQL; 27 | 28 | return DRIZZLE_DEFAULT_UDS; 29 | } 30 | 31 | return NULL; 32 | } 33 | 34 | void drizzle_con_set_uds(drizzle_con_st *con, const char *uds) 35 | { 36 | drizzle_con_reset_addrinfo(con); 37 | 38 | con->socket_type= DRIZZLE_CON_SOCKET_UDS; 39 | 40 | if (uds == NULL) 41 | uds= ""; 42 | 43 | con->socket.uds.sockaddr.sun_family= AF_UNIX; 44 | strncpy(con->socket.uds.sockaddr.sun_path, uds, 45 | sizeof(con->socket.uds.sockaddr.sun_path)); 46 | con->socket.uds.sockaddr.sun_path[sizeof(con->socket.uds.sockaddr.sun_path) - 1]= 0; 47 | 48 | con->socket.uds.addrinfo.ai_family= AF_UNIX; 49 | con->socket.uds.addrinfo.ai_socktype= SOCK_STREAM; 50 | con->socket.uds.addrinfo.ai_protocol= 0; 51 | con->socket.uds.addrinfo.ai_addrlen= sizeof(struct sockaddr_un); 52 | con->socket.uds.addrinfo.ai_addr= (struct sockaddr *)&(con->socket.uds.sockaddr); 53 | } 54 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_python3.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystems 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | AC_DEFUN([PANDORA_WITH_PYTHON3], [ 13 | 14 | AC_REQUIRE([PANDORA_SWIG]) 15 | 16 | AC_ARG_WITH([python3], 17 | [AS_HELP_STRING([--with-python3], 18 | [Build Python3 Bindings @<:@default=yes@:>@])],[ 19 | with_python3=$withval 20 | python3_requested=$withval 21 | ],[ 22 | with_python3=yes 23 | python3_requested=no 24 | ]) 25 | 26 | AS_IF([test "x$ac_cv_swig_has_python3_" != "xyes"],[ 27 | with_python3=no 28 | ],[ 29 | AS_IF([test "x$with_python3" != "xno"],[ 30 | AS_IF([test "x$with_python3" != "xyes"], 31 | [PYTHON3=$with_python3],[ 32 | AC_PATH_PROG([PYTHON3],[python3],[no]) 33 | PANDORA_PYTHON3_DEVEL() 34 | AS_IF([test "x$python3exists" = "xno"],[with_python="no"]) 35 | ]) 36 | ]) 37 | ]) 38 | AS_IF([test "x$with_python3" = "xno" -a "$python3_requested" = "yes"],[ 39 | AC_MSG_ERROR([Python3 support was explicity requested, but Python3 support 40 | was not found. Please correct your build environment and try 41 | again]) 42 | ]) 43 | AM_CONDITIONAL(BUILD_PYTHON3, [test "$with_python3" = "yes"]) 44 | ]) 45 | -------------------------------------------------------------------------------- /deps/libdrizzle/tests/drizzle_result_st.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief drizzle_result_st tests 14 | */ 15 | 16 | #include "tests/common.h" 17 | 18 | int main(void) 19 | { 20 | drizzle_st *drizzle; 21 | drizzle_con_st *con; 22 | drizzle_result_st *result; 23 | drizzle_result_st result_buffer; 24 | drizzle_result_st *clone; 25 | 26 | printf("sizeof(drizzle_result_st) = %zu\n", sizeof(drizzle_result_st)); 27 | 28 | if ((drizzle= drizzle_create(NULL)) == NULL) 29 | drizzle_test_error("drizzle_create"); 30 | 31 | if ((con= drizzle_con_create(drizzle, NULL)) == NULL) 32 | drizzle_test_error("drizzle_con_create"); 33 | 34 | if ((result= drizzle_result_create(con, &result_buffer)) == NULL) 35 | drizzle_test_error("drizzle_result_create"); 36 | drizzle_result_free(result); 37 | 38 | if ((result= drizzle_result_create(con, NULL)) == NULL) 39 | drizzle_test_error("drizzle_result_create"); 40 | 41 | if ((clone= drizzle_result_clone(con, NULL, result)) == NULL) 42 | drizzle_test_error("drizzle_result_clone"); 43 | drizzle_result_free(clone); 44 | 45 | drizzle_result_set_info(result, "simple test"); 46 | 47 | if (strcmp(drizzle_result_info(result), "simple test")) 48 | drizzle_test_error("drizzle_result_info"); 49 | 50 | drizzle_result_free(result); 51 | drizzle_con_free(con); 52 | drizzle_free(drizzle); 53 | 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /deps/http_parser/Makefile: -------------------------------------------------------------------------------- 1 | CC?=gcc 2 | AR?=ar 3 | 4 | CPPFLAGS += -I. 5 | CPPFLAGS_DEBUG = $(CPPFLAGS) -DHTTP_PARSER_STRICT=1 -DHTTP_PARSER_DEBUG=1 6 | CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA) 7 | CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0 -DHTTP_PARSER_DEBUG=0 8 | CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA) 9 | 10 | CFLAGS += -Wall -Wextra -Werror 11 | CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA) 12 | CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) 13 | 14 | 15 | test: test_g test_fast 16 | ./test_g 17 | ./test_fast 18 | 19 | test_g: http_parser_g.o test_g.o 20 | $(CC) $(CFLAGS_DEBUG) $(LDFLAGS) http_parser_g.o test_g.o -o $@ 21 | 22 | test_g.o: test.c http_parser.h Makefile 23 | $(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c test.c -o $@ 24 | 25 | http_parser_g.o: http_parser.c http_parser.h Makefile 26 | $(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c http_parser.c -o $@ 27 | 28 | test_fast: http_parser.o test.o http_parser.h 29 | $(CC) $(CFLAGS_FAST) $(LDFLAGS) http_parser.o test.o -o $@ 30 | 31 | test.o: test.c http_parser.h Makefile 32 | $(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c test.c -o $@ 33 | 34 | http_parser.o: http_parser.c http_parser.h Makefile 35 | $(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c http_parser.c 36 | 37 | test-run-timed: test_fast 38 | while(true) do time ./test_fast > /dev/null; done 39 | 40 | test-valgrind: test_g 41 | valgrind ./test_g 42 | 43 | package: http_parser.o 44 | $(AR) rcs libhttp_parser.a http_parser.o 45 | 46 | tags: http_parser.c http_parser.h test.c 47 | ctags $^ 48 | 49 | clean: 50 | rm -f *.o *.a test test_fast test_g http_parser.tar tags 51 | 52 | .PHONY: clean package test-run test-run-timed test-valgrind 53 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/visibility.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | * 10 | * Implementation drawn from visibility.texi in gnulib. 11 | */ 12 | 13 | /** 14 | * @file 15 | * @brief Visibility Control Macros 16 | */ 17 | 18 | #ifndef __DRIZZLE_VISIBILITY_H 19 | #define __DRIZZLE_VISIBILITY_H 20 | 21 | /** 22 | * 23 | * DRIZZLE_API is used for the public API symbols. It either DLL imports or 24 | * DLL exports (or does nothing for static build). 25 | * 26 | * DRIZZLE_LOCAL is used for non-api symbols. 27 | */ 28 | 29 | #if defined(_WIN32) 30 | # define DRIZZLE_API 31 | # define DRIZZLE_LOCAL 32 | #else 33 | #if defined(BUILDING_LIBDRIZZLE) 34 | # if defined(HAVE_VISIBILITY) 35 | # define DRIZZLE_API __attribute__ ((visibility("default"))) 36 | # define DRIZZLE_LOCAL __attribute__ ((visibility("hidden"))) 37 | # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) 38 | # define DRIZZLE_API __global 39 | # define DRIZZLE_API __hidden 40 | # elif defined(_MSC_VER) 41 | # define DRIZZLE_API extern __declspec(dllexport) 42 | # define DRIZZLE_LOCAL 43 | # endif /* defined(HAVE_VISIBILITY) */ 44 | #else /* defined(BUILDING_LIBDRIZZLE) */ 45 | # if defined(_MSC_VER) 46 | # define DRIZZLE_API extern __declspec(dllimport) 47 | # define DRIZZLE_LOCAL 48 | # else 49 | # define DRIZZLE_API 50 | # define DRIZZLE_LOCAL 51 | # endif /* defined(_MSC_VER) */ 52 | #endif /* defined(BUILDING_LIBDRIZZLE) */ 53 | #endif /* _WIN32 */ 54 | 55 | #endif /* __DRIZZLE_VISIBILITY_H */ 56 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_nowarn.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright (C) 2010 by Daniel Stenberg 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | 18 | #include "ares_setup.h" 19 | 20 | #include "ares_nowarn.h" 21 | 22 | #define CARES_MASK_UINT (~(unsigned int) 0) 23 | #define CARES_MASK_SINT (CARES_MASK_UINT >> 1) 24 | 25 | /* 26 | ** size_t to signed int 27 | */ 28 | 29 | int aresx_uztosi(size_t uznum) 30 | { 31 | #ifdef __INTEL_COMPILER 32 | # pragma warning(push) 33 | # pragma warning(disable:810) /* conversion may lose significant bits */ 34 | #endif 35 | 36 | return (int)(uznum & (size_t) CARES_MASK_SINT); 37 | 38 | #ifdef __INTEL_COMPILER 39 | # pragma warning(pop) 40 | #endif 41 | } 42 | 43 | /* 44 | ** signed long to signed int 45 | */ 46 | 47 | int aresx_sltosi(long slnum) 48 | { 49 | #ifdef __INTEL_COMPILER 50 | # pragma warning(push) 51 | # pragma warning(disable:810) /* conversion may lose significant bits */ 52 | #endif 53 | 54 | return (int)(slnum & (long) CARES_MASK_SINT); 55 | 56 | #ifdef __INTEL_COMPILER 57 | # pragma warning(pop) 58 | #endif 59 | } 60 | -------------------------------------------------------------------------------- /deps/libdrizzle/ChangeLog: -------------------------------------------------------------------------------- 1 | 0.8 - 2010-03-17 2 | * Added prototest suite for testing the MySQL protocol. 3 | * Changed default protocol to be MySQL for Drizzle connections. This 4 | is to stay in sync with defaults on the Drizzle server. 5 | * Build system and RPM packaging updates. 6 | * Bug fixes in concurrent query execution and compiling for FreeBSD. 7 | 8 | 0.7 - 2010-01-12 9 | * Added test coverage reports using lcov. 10 | * Added new test cases for basic client/server functionality. 11 | * Updated autoconf build system. 12 | 13 | 0.6 - 2009-12-07 14 | * Various cleanup and fixes around custom socket event handling and listening 15 | code. 16 | * Updated autoconf build system. 17 | * Updated RPM packaging. 18 | 19 | 0.5 - 2009-11-10 20 | * Added new logging functions. 21 | * Added more test cases. 22 | * Cleaned up API, added more documentation. 23 | * Updated autoconf build system. 24 | 25 | 0.4 - 2009-06-30 26 | * Removed virtual column type. 27 | * Minor bug fixes. 28 | * Updated autoconf build system. 29 | 30 | 0.3 - 2009-05-28 31 | * Improved connection interface and better handling or result error codes. 32 | * Start of a windows port. 33 | * Struct realignment. 34 | * Cleaned up connection handling and error messages. 35 | * Improved packaging support. 36 | * Added external I/O event hooks. 37 | * Various small bug fixes and cleanup. 38 | 39 | 0.2.0 - 2009-03-27 40 | * Added test framework and a few simple tests, more to come. 41 | * Changes required for Drizzle client utility integration. 42 | * Fixed a few connection handling and retry bugs. 43 | * Simplified the escape/hex string processing. 44 | * Various autotools and build system fixes. 45 | 46 | 0.1 - 2009-02-10 47 | * First release. 48 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/field_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Field Declarations for Clients 14 | */ 15 | 16 | #ifndef __DRIZZLE_FIELD_CLIENT_H 17 | #define __DRIZZLE_FIELD_CLIENT_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_field_client Field Declarations for Clients 25 | * @ingroup drizzle_client_interface 26 | * 27 | * These functions allow you to access fields in a result set if the result is 28 | * unbuffered. If the result is buffered, you can access the fields through the 29 | * row functions. 30 | * @{ 31 | */ 32 | 33 | /** 34 | * Read field for unbuffered result, possibly in parts. This is especially 35 | * useful for blob streaming, since the client does not need to buffer the 36 | * entire blob. 37 | */ 38 | DRIZZLE_API 39 | drizzle_field_t drizzle_field_read(drizzle_result_st *result, size_t *offset, 40 | size_t *size, size_t *total, 41 | drizzle_return_t *ret_ptr); 42 | 43 | /** 44 | * Buffer one field. 45 | */ 46 | DRIZZLE_API 47 | drizzle_field_t drizzle_field_buffer(drizzle_result_st *result, size_t *total, 48 | drizzle_return_t *ret_ptr); 49 | 50 | /** 51 | * Free a buffered field. 52 | */ 53 | DRIZZLE_API 54 | void drizzle_field_free(drizzle_field_t field); 55 | 56 | /** @} */ 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif /* __DRIZZLE_FIELD_CLIENT_H */ 63 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libuuid.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for libuuid 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[ 12 | AC_REQUIRE([AC_LIB_PREFIX]) 13 | 14 | dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may 15 | dnl not be a lib is weird. 16 | AC_CHECK_HEADERS(uuid/uuid.h) 17 | AC_LIB_HAVE_LINKFLAGS(uuid,, 18 | [ 19 | #include 20 | ], 21 | [ 22 | uuid_t uout; 23 | uuid_generate(uout); 24 | ]) 25 | 26 | AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"]) 27 | ]) 28 | 29 | AC_DEFUN([_PANDORA_HAVE_LIBUUID],[ 30 | 31 | AC_ARG_ENABLE([libuuid], 32 | [AS_HELP_STRING([--disable-libuuid], 33 | [Build with libuuid support @<:@default=on@:>@])], 34 | [ac_enable_libuuid="$enableval"], 35 | [ac_enable_libuuid="yes"]) 36 | 37 | _PANDORA_SEARCH_LIBUUID 38 | ]) 39 | 40 | 41 | AC_DEFUN([PANDORA_HAVE_LIBUUID],[ 42 | AC_REQUIRE([_PANDORA_HAVE_LIBUUID]) 43 | ]) 44 | 45 | AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[ 46 | ac_enable_libuuid="yes" 47 | _PANDORA_SEARCH_LIBUUID 48 | AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[ 49 | AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.]) 50 | ]) 51 | ]) 52 | 53 | AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[ 54 | AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID]) 55 | ]) 56 | -------------------------------------------------------------------------------- /deps/libuv/test/runner-win.h: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | /* Don't complain about _snprintf being unsecure. */ 23 | #define _CRT_SECURE_NO_WARNINGS 24 | 25 | /* Dont complain about write(), fileno() etc. being deprecated. */ 26 | #pragma warning(disable : 4996) 27 | 28 | 29 | #include 30 | #include 31 | 32 | 33 | /* Windows has no snprintf, only _snprintf. */ 34 | #define snprintf _snprintf 35 | 36 | 37 | typedef struct { 38 | HANDLE process; 39 | HANDLE stdio_in; 40 | HANDLE stdio_out; 41 | char *name; 42 | } process_info_t; 43 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_gettext.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystems 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | AC_DEFUN([PANDORA_WITH_GETTEXT],[ 13 | 14 | 15 | m4_syscmd([if test -d po ; then 16 | echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp 17 | PACKAGE=$(grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]) 18 | for f in $(find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort) 19 | do 20 | if grep gettext.h "$f" | grep include >/dev/null 2>&1 21 | then 22 | echo "$f" >> po/POTFILES.in.stamp 23 | fi 24 | done 25 | if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1 26 | then 27 | rm po/POTFILES.in.stamp 28 | else 29 | mv po/POTFILES.in.stamp po/POTFILES.in 30 | fi 31 | fi]) 32 | 33 | m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [ 34 | AM_GNU_GETTEXT(external, need-formatstring-macros) 35 | AM_GNU_GETTEXT_VERSION([0.17]) 36 | AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[ 37 | AM_PATH_PROG_WITH_TEST([GMSGMERGE], gmsgmerge, 38 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) 39 | MSGMERGE="${GMSGMERGE}" 40 | ]) 41 | AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"]) 42 | ]) 43 | 44 | ]) 45 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/handshake_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Handshake Declarations for Clients 14 | */ 15 | 16 | #ifndef __DRIZZLE_HANDSHAKE_CLIENT_H 17 | #define __DRIZZLE_HANDSHAKE_CLIENT_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_handshake_client Handshake Declarations for Clients 25 | * @ingroup drizzle_client_interface 26 | * 27 | * These functions are used to send and receive handshake packets for a client. 28 | * These are only used by low-level clients when the DRIZZLE_CON_RAW_PACKET 29 | * option is set, so most applications will never need to use these. 30 | * @{ 31 | */ 32 | 33 | /** 34 | * Read handshake packet from the server in a client. 35 | * 36 | * @param[in] con Connection structure previously initialized with 37 | * drizzle_con_create(), drizzle_con_clone(), or related functions. 38 | * @return Standard drizzle return value. 39 | */ 40 | DRIZZLE_API 41 | drizzle_return_t drizzle_handshake_server_read(drizzle_con_st *con); 42 | 43 | /** 44 | * Write client handshake packet to a server. 45 | * 46 | * @param[in] con Connection structure previously initialized with 47 | * drizzle_con_create(), drizzle_con_clone(), or related functions. 48 | * @return Standard drizzle return value. 49 | */ 50 | DRIZZLE_API 51 | drizzle_return_t drizzle_handshake_client_write(drizzle_con_st *con); 52 | 53 | /** @} */ 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* __DRIZZLE_HANDSHAKE_CLIENT_H */ 60 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/pack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief Packing Declarations 14 | */ 15 | 16 | #ifndef __DRIZZLE_PACK_H 17 | #define __DRIZZLE_PACK_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /** 24 | * @addtogroup drizzle_pack Packing Declarations 25 | * 26 | * These functions are used internally to pack various parts of the protocol. 27 | * Not all functions are defined in pack.c, they are in the most appropriate 28 | * source file (for example, handshake.c for drizzle_pack_client_handshake). 29 | * @{ 30 | */ 31 | 32 | /** 33 | * Pack length-encoded number. 34 | */ 35 | DRIZZLE_API 36 | uint8_t *drizzle_pack_length(uint64_t number, uint8_t *ptr); 37 | 38 | /** 39 | * Unpack length-encoded number. 40 | */ 41 | DRIZZLE_API 42 | uint64_t drizzle_unpack_length(drizzle_con_st *con, drizzle_return_t *ret_ptr); 43 | 44 | /** 45 | * Pack length-encoded string. 46 | */ 47 | DRIZZLE_API 48 | uint8_t *drizzle_pack_string(char *string, uint8_t *ptr); 49 | 50 | /** 51 | * Unpack length-encoded string. 52 | */ 53 | DRIZZLE_API 54 | drizzle_return_t drizzle_unpack_string(drizzle_con_st *con, char *buffer, 55 | uint64_t max_size); 56 | 57 | /** 58 | * Pack user, scramble, and db. 59 | */ 60 | DRIZZLE_API 61 | uint8_t *drizzle_pack_auth(drizzle_con_st *con, uint8_t *ptr, 62 | drizzle_return_t *ret_ptr); 63 | 64 | /** @} */ 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* __DRIZZLE_PACK_H */ 71 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libxml2.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | dnl Provides support for finding libxml2. 7 | dnl LIBXML2_CFLAGS will be set, in addition to LIBXML2 and LTLIBXML2 8 | 9 | AC_DEFUN([_PANDORA_SEARCH_LIBXML2],[ 10 | AC_REQUIRE([AC_LIB_PREFIX]) 11 | 12 | dnl -------------------------------------------------------------------- 13 | dnl Check for libxml2 14 | dnl -------------------------------------------------------------------- 15 | 16 | AC_ARG_ENABLE([libxml2], 17 | [AS_HELP_STRING([--disable-libxml2], 18 | [Build with libxml2 support @<:@default=on@:>@])], 19 | [ac_enable_libxml2="$enableval"], 20 | [ac_enable_libxml2="yes"]) 21 | 22 | AS_IF([test "x$ac_enable_libxml2" = "xyes"],[ 23 | AC_LIB_HAVE_LINKFLAGS(xml2,,[ 24 | #include 25 | ],[ 26 | const char *test= LIBXML_DOTTED_VERSION; 27 | ]) 28 | ],[ 29 | ac_cv_libxml2="no" 30 | ]) 31 | 32 | AS_IF([test "${ac_cv_libxml2}" = "no" -a "${ac_enable_libxml2}" = "yes"],[ 33 | 34 | PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [ 35 | ac_cv_libxml2=yes 36 | LTLIBXML2=${LIBXML2_LIBS} 37 | LIBXML2=${LIBXML2_LIBS} 38 | ],[]) 39 | ]) 40 | 41 | AM_CONDITIONAL(HAVE_LIBXML2, [test "${ac_cv_libxml2}" = "yes"]) 42 | ]) 43 | 44 | AC_DEFUN([PANDORA_HAVE_LIBXML2],[ 45 | AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) 46 | ]) 47 | 48 | AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[ 49 | AC_REQUIRE([_PANDORA_SEARCH_LIBXML2]) 50 | AS_IF([test "x${ac_cv_libxml2}" = "xno"], 51 | AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.])) 52 | ]) 53 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/bitncmp.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 4 | * Copyright (c) 1996,1999 by Internet Software Consortium. 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 16 | * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef HAVE_BITNCMP 20 | 21 | #include "ares_setup.h" 22 | #include "bitncmp.h" 23 | 24 | /* 25 | * int 26 | * bitncmp(l, r, n) 27 | * compare bit masks l and r, for n bits. 28 | * return: 29 | * -1, 1, or 0 in the libc tradition. 30 | * note: 31 | * network byte order assumed. this means 192.5.5.240/28 has 32 | * 0x11110000 in its fourth octet. 33 | * author: 34 | * Paul Vixie (ISC), June 1996 35 | */ 36 | int 37 | ares_bitncmp(const void *l, const void *r, int n) { 38 | unsigned int lb, rb; 39 | int x, b; 40 | 41 | b = n / 8; 42 | x = memcmp(l, r, b); 43 | if (x || (n % 8) == 0) 44 | return (x); 45 | 46 | lb = ((const unsigned char *)l)[b]; 47 | rb = ((const unsigned char *)r)[b]; 48 | for (b = n % 8; b > 0; b--) { 49 | if ((lb & 0x80) != (rb & 0x80)) { 50 | if (lb & 0x80) 51 | return (1); 52 | return (-1); 53 | } 54 | lb <<= 1; 55 | rb <<= 1; 56 | } 57 | return (0); 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /deps/libuv/LICENSE: -------------------------------------------------------------------------------- 1 | libuv is part of the Node project: http://nodejs.org/ 2 | libuv may be distributed alone under Node's license: 3 | 4 | ==== 5 | 6 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to 9 | deal in the Software without restriction, including without limitation the 10 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | IN THE SOFTWARE. 24 | 25 | ==== 26 | 27 | This license applies to all parts of libuv that are not externally 28 | maintained libraries. 29 | 30 | The externally maintained libraries used by libuv are: 31 | 32 | - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. 33 | 34 | - ngx_queue.h (from Nginx), copyright Igor Sysoev. Two clause BSD license. 35 | 36 | - libev, located at ev/ is copyright Marc Alexander Lehmann, and 37 | dual-licensed under the MIT license and GPL2. 38 | 39 | - libeio, located at eio/ is copyright Marc Alexander Lehmann, and 40 | dual-licensed under the MIT license and GPL2. 41 | -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/generator/gypsh.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | """gypsh output module 8 | 9 | gypsh is a GYP shell. It's not really a generator per se. All it does is 10 | fire up an interactive Python session with a few local variables set to the 11 | variables passed to the generator. Like gypd, it's intended as a debugging 12 | aid, to facilitate the exploration of .gyp structures after being processed 13 | by the input module. 14 | 15 | The expected usage is "gyp -f gypsh -D OS=desired_os". 16 | """ 17 | 18 | 19 | import code 20 | import sys 21 | 22 | 23 | # All of this stuff about generator variables was lovingly ripped from gypd.py. 24 | # That module has a much better description of what's going on and why. 25 | _generator_identity_variables = [ 26 | 'EXECUTABLE_PREFIX', 27 | 'EXECUTABLE_SUFFIX', 28 | 'INTERMEDIATE_DIR', 29 | 'PRODUCT_DIR', 30 | 'RULE_INPUT_ROOT', 31 | 'RULE_INPUT_EXT', 32 | 'RULE_INPUT_NAME', 33 | 'RULE_INPUT_PATH', 34 | 'SHARED_INTERMEDIATE_DIR', 35 | ] 36 | 37 | generator_default_variables = { 38 | } 39 | 40 | for v in _generator_identity_variables: 41 | generator_default_variables[v] = '<(%s)' % v 42 | 43 | 44 | def GenerateOutput(target_list, target_dicts, data, params): 45 | locals = { 46 | 'target_list': target_list, 47 | 'target_dicts': target_dicts, 48 | 'data': data, 49 | } 50 | 51 | # Use a banner that looks like the stock Python one and like what 52 | # code.interact uses by default, but tack on something to indicate what 53 | # locals are available, and identify gypsh. 54 | banner='Python %s on %s\nlocals.keys() = %s\ngypsh' % \ 55 | (sys.version, sys.platform, repr(sorted(locals.keys()))) 56 | 57 | code.interact(banner, local=locals) 58 | -------------------------------------------------------------------------------- /deps/libdrizzle/libdrizzle/state.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief State machine definitions 14 | */ 15 | 16 | #include "common.h" 17 | 18 | drizzle_return_t drizzle_state_loop(drizzle_con_st *con) 19 | { 20 | drizzle_return_t ret; 21 | 22 | while (!drizzle_state_none(con)) 23 | { 24 | ret= con->state_stack[con->state_current - 1](con); 25 | if (ret != DRIZZLE_RETURN_OK) 26 | { 27 | if (ret != DRIZZLE_RETURN_IO_WAIT && ret != DRIZZLE_RETURN_PAUSE && 28 | ret != DRIZZLE_RETURN_ERROR_CODE) 29 | { 30 | drizzle_con_close(con); 31 | } 32 | 33 | return ret; 34 | } 35 | } 36 | 37 | return DRIZZLE_RETURN_OK; 38 | } 39 | 40 | drizzle_return_t drizzle_state_packet_read(drizzle_con_st *con) 41 | { 42 | drizzle_log_debug(con->drizzle, "drizzle_state_packet_read"); 43 | 44 | if (con->buffer_size < 4) 45 | { 46 | drizzle_state_push(con, drizzle_state_read); 47 | return DRIZZLE_RETURN_OK; 48 | } 49 | 50 | con->packet_size= drizzle_get_byte3(con->buffer_ptr); 51 | 52 | if (con->packet_number != con->buffer_ptr[3]) 53 | { 54 | drizzle_set_error(con->drizzle, "drizzle_state_packet_read", 55 | "bad packet number:%u:%u", con->packet_number, 56 | con->buffer_ptr[3]); 57 | return DRIZZLE_RETURN_BAD_PACKET_NUMBER; 58 | } 59 | 60 | drizzle_log_debug(con->drizzle, "packet_size= %zu, packet_number= %u", 61 | con->packet_size, con->packet_number); 62 | 63 | con->packet_number++; 64 | 65 | con->buffer_ptr+= 4; 66 | con->buffer_size-= 4; 67 | 68 | drizzle_state_pop(con); 69 | return DRIZZLE_RETURN_OK; 70 | } 71 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libboost_options.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2010 Monty Taylor 2 | dnl This file is free software; Monty Taylor 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for boost::program_options 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_LANG_PUSH(C++) 14 | AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[ 15 | #include 16 | ],[ 17 | boost::program_options::options_description d; 18 | d.add_options()("a","some option"); 19 | ]) 20 | AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[ 21 | AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[ 22 | #include 23 | ],[ 24 | boost::program_options::options_description d; 25 | d.add_options()("a","some option"); 26 | ]) 27 | ]) 28 | AC_LANG_POP() 29 | 30 | AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS, 31 | [test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"]) 32 | BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}" 33 | AC_SUBST(BOOST_LIBS) 34 | ]) 35 | 36 | AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[ 37 | PANDORA_HAVE_BOOST($1) 38 | _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1) 39 | ]) 40 | 41 | AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[ 42 | PANDORA_REQUIRE_BOOST($1) 43 | _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1) 44 | AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"], 45 | AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}])) 46 | ]) 47 | 48 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_php.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystems 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | 13 | AC_DEFUN([PANDORA_WITH_PHP],[ 14 | 15 | AC_ARG_WITH([php], 16 | [AS_HELP_STRING([--with-php], 17 | [Build NDB/PHP @<:@default=no@:>@])], 18 | [with_php=$withval], 19 | [with_php=no]) 20 | 21 | AS_IF([test "x$with_php" != "xno"],[ 22 | dnl We explicitly requested PHP build. Fail on too-young SWIG. 23 | AS_IF([test "x$SWIG_CAN_BUILD_PHP" != "xyes"], 24 | [AC_MSG_ERROR("Your version of SWIG is too young to build NDB/PHP. >=1.3.33 is required!")]) 25 | AS_IF([test "x$with_php" != "xyes"], 26 | [ac_check_php_config=$with_php], 27 | [ac_check_php_config="php-config php-config5"]) 28 | AC_CHECK_PROGS(PHP_CONFIG, [$ac_check_php_config]) 29 | ]) 30 | 31 | AS_IF([test "x$PHP_CONFIG" != "x"],[ 32 | PHP_CFLAGS=`$PHP_CONFIG --includes` 33 | PHP_CPPFLAGS=`$PHP_CONFIG --includes` 34 | PHP_LDFLAGS=`$PHP_CONFIG --ldflags` 35 | PHP_EXTDIR=`$PHP_CONFIG --extension-dir` 36 | strip_php_prefix=`$PHP_CONFIG --prefix | sed 's/\//./g'` 37 | PHP_ARCH_DIR=`echo $PHP_EXTDIR | sed "s/$strip_php_prefix//"` 38 | ],[ 39 | PHP_CFLAGS= 40 | PHP_CPPFLAGS= 41 | PHP_LDFLAGS= 42 | PHP_EXTDIR= 43 | PHP_ARCH_DIR= 44 | with_php=no 45 | ]) 46 | 47 | AC_SUBST(PHP_CFLAGS) 48 | AC_SUBST(PHP_CPPFLAGS) 49 | AC_SUBST(PHP_LDFLAGS) 50 | AC_SUBST(PHP_EXTDIR) 51 | AC_SUBST(PHP_ARCH_DIR) 52 | 53 | AM_CONDITIONAL(BUILD_PHP, test "$with_php" = "yes") 54 | 55 | ]) 56 | 57 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_strcasecmp.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | #include "ares_strcasecmp.h" 20 | 21 | #ifndef HAVE_STRCASECMP 22 | int ares_strcasecmp(const char *a, const char *b) 23 | { 24 | #if defined(HAVE_STRCMPI) 25 | return strcmpi(a, b); 26 | #elif defined(HAVE_STRICMP) 27 | return stricmp(a, b); 28 | #else 29 | size_t i; 30 | 31 | for (i = 0; i < (size_t)-1; i++) { 32 | int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; 33 | int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; 34 | if (c1 != c2) 35 | return c1-c2; 36 | if (!c1) 37 | break; 38 | } 39 | return 0; 40 | #endif 41 | } 42 | #endif 43 | 44 | #ifndef HAVE_STRNCASECMP 45 | int ares_strncasecmp(const char *a, const char *b, size_t n) 46 | { 47 | #if defined(HAVE_STRNCMPI) 48 | return strncmpi(a, b, n); 49 | #elif defined(HAVE_STRNICMP) 50 | return strnicmp(a, b, n); 51 | #else 52 | size_t i; 53 | 54 | for (i = 0; i < n; i++) { 55 | int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; 56 | int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; 57 | if (c1 != c2) 58 | return c1-c2; 59 | if (!c1) 60 | break; 61 | } 62 | return 0; 63 | #endif 64 | } 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/generator/dump_dependency_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Copyright (c) 2011 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import collections 8 | import gyp 9 | import gyp.common 10 | import json 11 | 12 | generator_wants_static_library_dependencies_adjusted = False 13 | 14 | generator_default_variables = { 15 | 'OS': 'linux', 16 | } 17 | for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR', 18 | 'LIB_DIR', 'SHARED_LIB_DIR']: 19 | # Some gyp steps fail if these are empty(!). 20 | generator_default_variables[dirname] = 'dir' 21 | for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME', 22 | 'RULE_INPUT_EXT', 23 | 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX', 24 | 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX', 25 | 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX', 26 | 'LINKER_SUPPORTS_ICF']: 27 | generator_default_variables[unused] = '' 28 | 29 | 30 | def CalculateVariables(default_variables, params): 31 | generator_flags = params.get('generator_flags', {}) 32 | default_variables['OS'] = generator_flags.get('os', 'linux') 33 | 34 | 35 | def GenerateOutput(target_list, target_dicts, data, params): 36 | # Map of target -> list of targets it depends on. 37 | edges = {} 38 | 39 | # Queue of targets to visit. 40 | targets_to_visit = target_list[:] 41 | 42 | while len(targets_to_visit) > 0: 43 | target = targets_to_visit.pop() 44 | if target in edges: 45 | continue 46 | edges[target] = [] 47 | 48 | for dep in target_dicts[target].get('dependencies', []): 49 | edges[target].append(dep) 50 | targets_to_visit.append(dep) 51 | 52 | filename = 'dump.json' 53 | f = open(filename, 'w') 54 | json.dump(edges, f) 55 | f.close() 56 | print 'Wrote json to %s.' % filename 57 | -------------------------------------------------------------------------------- /deps/libuv/gyp_uv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import glob 3 | import os 4 | import shlex 5 | import sys 6 | 7 | script_dir = os.path.dirname(__file__) 8 | uv_root = os.path.normpath(script_dir) 9 | 10 | sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib')) 11 | import gyp 12 | 13 | # Directory within which we want all generated files (including Makefiles) 14 | # to be written. 15 | output_dir = os.path.join(os.path.abspath(uv_root), 'out') 16 | 17 | def run_gyp(args): 18 | rc = gyp.main(args) 19 | if rc != 0: 20 | print 'Error running GYP' 21 | sys.exit(rc) 22 | 23 | if __name__ == '__main__': 24 | args = sys.argv[1:] 25 | 26 | # GYP bug. 27 | # On msvs it will crash if it gets an absolute path. 28 | # On Mac/make it will crash if it doesn't get an absolute path. 29 | if sys.platform == 'win32': 30 | args.append(os.path.join(uv_root, 'uv.gyp')) 31 | common_fn = os.path.join(uv_root, 'common.gypi') 32 | options_fn = os.path.join(uv_root, 'options.gypi') 33 | else: 34 | args.append(os.path.join(os.path.abspath(uv_root), 'uv.gyp')) 35 | common_fn = os.path.join(os.path.abspath(uv_root), 'common.gypi') 36 | options_fn = os.path.join(os.path.abspath(uv_root), 'options.gypi') 37 | 38 | if os.path.exists(common_fn): 39 | args.extend(['-I', common_fn]) 40 | 41 | if os.path.exists(options_fn): 42 | args.extend(['-I', options_fn]) 43 | 44 | args.append('--depth=' + uv_root) 45 | 46 | # There's a bug with windows which doesn't allow this feature. 47 | if sys.platform != 'win32': 48 | 49 | # Tell gyp to write the Makefiles into output_dir 50 | args.extend(['--generator-output', output_dir]) 51 | 52 | # Tell make to write its output into the same dir 53 | args.extend(['-Goutput_dir=' + output_dir]) 54 | 55 | args.append('-Dtarget_arch=ia32') 56 | args.append('-Dcomponent=static_library') 57 | args.append('-Dlibrary=static_library') 58 | gyp_args = list(args) 59 | print gyp_args 60 | run_gyp(gyp_args) 61 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_with_lua.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 3 | dnl 4 | dnl pandora-build: A pedantic build system 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. 6 | dnl This file is free software; Sun Microsystems 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl 10 | dnl From Monty Taylor 11 | 12 | AC_DEFUN([PANDORA_WITH_LUA],[ 13 | dnl Check for lua 14 | AC_ARG_WITH([lua], 15 | [AS_HELP_STRING([--with-lua], 16 | [Build Lua Bindings @<:@default=yes@:>@])], 17 | [with_lua=$withval], 18 | [with_lua=yes]) 19 | 20 | AS_IF([test "x$with_lua" != "xno"],[ 21 | AS_IF([test "x$with_lua" = "xyes"], 22 | [LUAPC=lua], 23 | [LUAPC=$with_lua]) 24 | 25 | PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [ 26 | AC_DEFINE([HAVE_LUA], [1], [liblua]) 27 | AC_DEFINE([HAVE_LUA_H], [1], [lua.h]) 28 | with_lua=yes 29 | ],[ 30 | LUAPC=lua5.1 31 | PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [ 32 | AC_DEFINE([HAVE_LUA], [1], [liblua]) 33 | AC_DEFINE([HAVE_LUA_H], [1], [lua.h]) 34 | with_lua=yes 35 | ],[ 36 | AC_DEFINE([HAVE_LUA],["x"],["x"]) 37 | with_lua=no 38 | ]) 39 | ]) 40 | 41 | AC_CACHE_CHECK([for LUA installation location],[pandora_cv_lua_archdir],[ 42 | AS_IF([test "$prefix" = "NONE"],[ 43 | pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${ac_default_prefix} --variable=INSTALL_CMOD ${LUAPC}` 44 | ],[ 45 | pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${prefix} --variable=INSTALL_CMOD ${LUAPC}` 46 | ]) 47 | ]) 48 | LUA_ARCHDIR="${pandora_cv_lua_archdir}" 49 | AC_SUBST(LUA_ARCHDIR) 50 | AC_SUBST(LUA_CFLAGS) 51 | AC_SUBST(LUA_LIBS) 52 | ]) 53 | AM_CONDITIONAL(BUILD_LUA, test "$with_lua" = "yes") 54 | 55 | ]) 56 | -------------------------------------------------------------------------------- /deps/libuv/test/test-hrtime.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "task.h" 24 | 25 | #ifndef MILLISEC 26 | # define MILLISEC 1000 27 | #endif 28 | 29 | #ifndef NANOSEC 30 | # define NANOSEC 1000000000 31 | #endif 32 | 33 | 34 | TEST_IMPL(hrtime) { 35 | uint64_t a, b, diff; 36 | 37 | a = uv_hrtime(); 38 | uv_sleep(100); 39 | b = uv_hrtime(); 40 | 41 | diff = b - a; 42 | 43 | printf("diff = %llu\n", (unsigned long long int) diff); 44 | 45 | /* The windows Sleep() function has only a resolution of 10-20 ms. */ 46 | /* Check that the difference between the two hrtime values is somewhat in */ 47 | /* the range we expect it to be. */ 48 | ASSERT(diff > (uint64_t) 80 * NANOSEC / MILLISEC); 49 | ASSERT(diff < (uint64_t) 120 * NANOSEC / MILLISEC); 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /deps/libuv/src/uv-common.h: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | /* 23 | * This file is private to libuv. It provides common functionality to both 24 | * Windows and Unix backends. 25 | */ 26 | 27 | #ifndef UV_COMMON_H_ 28 | #define UV_COMMON_H_ 29 | 30 | #include "uv.h" 31 | 32 | #define COUNTOF(a) (sizeof(a) / sizeof(a[0])) 33 | 34 | 35 | struct uv_ares_task_s { 36 | UV_HANDLE_FIELDS 37 | UV_ARES_TASK_PRIVATE_FIELDS 38 | uv_ares_task_t* ares_prev; 39 | uv_ares_task_t* ares_next; 40 | }; 41 | 42 | 43 | void uv_remove_ares_handle(uv_ares_task_t* handle); 44 | uv_ares_task_t* uv_find_ares_handle(uv_loop_t*, ares_socket_t sock); 45 | 46 | /* TODO Rename to uv_ares_task_init? */ 47 | void uv_add_ares_handle(uv_loop_t* loop, uv_ares_task_t* handle); 48 | 49 | int uv_ares_handles_empty(uv_loop_t* loop); 50 | 51 | 52 | #endif /* UV_COMMON_H_ */ 53 | -------------------------------------------------------------------------------- /deps/libuv/src/win/tty.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "internal.h" 24 | 25 | #include 26 | 27 | 28 | int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd) { 29 | assert(0 && "implement me"); 30 | return -1; 31 | } 32 | 33 | 34 | int uv_tty_set_mode(uv_tty_t* tty, int mode) { 35 | assert(0 && "implement me"); 36 | return -1; 37 | } 38 | 39 | 40 | int uv_is_tty(uv_file file) { 41 | } 42 | 43 | 44 | int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) { 45 | assert(0 && "implement me"); 46 | return -1; 47 | } 48 | 49 | 50 | uv_handle_type uv_guess_handle(uv_file file) { 51 | DWORD result; 52 | int r = GetConsoleMode((HANDLE)_get_osfhandle(file), &result); 53 | 54 | if (r) { 55 | return UV_TTY; 56 | } 57 | 58 | assert(0 && "implement me"); 59 | 60 | return UV_UNKNOWN_HANDLE; 61 | } 62 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libevent.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for libevent 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[ 12 | AC_REQUIRE([AC_LIB_PREFIX]) 13 | 14 | AC_LIB_HAVE_LINKFLAGS(event,, 15 | [ 16 | #include 17 | #include 18 | #include 19 | #include 20 | ],[ 21 | struct bufferevent bev; 22 | bufferevent_settimeout(&bev, 1, 1); 23 | event_init(); 24 | event_loop(EVLOOP_ONCE); 25 | ]) 26 | 27 | AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"]) 28 | 29 | AS_IF([test "x${ac_cv_libevent}" = "xyes"],[ 30 | save_LIBS="${LIBS}" 31 | LIBS="${LIBS} ${LTLIBEVENT}" 32 | AC_CHECK_FUNCS(event_base_new) 33 | AC_CHECK_FUNCS(event_base_free) 34 | AC_CHECK_FUNCS(event_base_get_method) 35 | LIBS="$save_LIBS" 36 | ]) 37 | ]) 38 | 39 | AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[ 40 | 41 | AC_ARG_ENABLE([libevent], 42 | [AS_HELP_STRING([--disable-libevent], 43 | [Build with libevent support @<:@default=on@:>@])], 44 | [ac_enable_libevent="$enableval"], 45 | [ac_enable_libevent="yes"]) 46 | 47 | _PANDORA_SEARCH_LIBEVENT 48 | ]) 49 | 50 | 51 | AC_DEFUN([PANDORA_HAVE_LIBEVENT],[ 52 | AC_REQUIRE([_PANDORA_HAVE_LIBEVENT]) 53 | ]) 54 | 55 | AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[ 56 | ac_enable_libevent="yes" 57 | _PANDORA_SEARCH_LIBEVENT 58 | 59 | AS_IF([test x$ac_cv_libevent = xno],[ 60 | AC_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.]) 61 | ]) 62 | ]) 63 | 64 | AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[ 65 | AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT]) 66 | ]) 67 | -------------------------------------------------------------------------------- /deps/libuv/test/test-threadpool.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "task.h" 24 | 25 | static int work_cb_count; 26 | static int after_work_cb_count; 27 | static uv_work_t work_req; 28 | static char data; 29 | 30 | 31 | static void work_cb(uv_work_t* req) { 32 | ASSERT(req == &work_req); 33 | ASSERT(req->data == &data); 34 | work_cb_count++; 35 | } 36 | 37 | 38 | static void after_work_cb(uv_work_t* req) { 39 | ASSERT(req == &work_req); 40 | ASSERT(req->data == &data); 41 | after_work_cb_count++; 42 | } 43 | 44 | 45 | TEST_IMPL(threadpool_queue_work_simple) { 46 | int r; 47 | 48 | work_req.data = &data; 49 | r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb); 50 | ASSERT(r == 0); 51 | uv_run(uv_default_loop()); 52 | 53 | ASSERT(work_cb_count == 1); 54 | ASSERT(after_work_cb_count == 1); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /deps/libuv/test/test-tty.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "task.h" 24 | 25 | TEST_IMPL(tty) { 26 | int r, width, height; 27 | uv_tty_t tty; 28 | uv_loop_t* loop = uv_default_loop(); 29 | 30 | /* 31 | * Not necessarally a problem if this assert goes off. E.G you are piping 32 | * this test to a file. 0 == stdin. 33 | */ 34 | ASSERT(UV_TTY == uv_guess_handle(0)); 35 | 36 | r = uv_tty_init(uv_default_loop(), &tty, 0); 37 | ASSERT(r == 0); 38 | 39 | r = uv_tty_get_winsize(&tty, &width, &height); 40 | ASSERT(r == 0); 41 | 42 | printf("width=%d height=%d\n", width, height); 43 | 44 | /* 45 | * Is it a safe assumption that most people have terminals larger than 46 | * 10x10? 47 | */ 48 | ASSERT(width > 10); 49 | ASSERT(height > 10); 50 | 51 | uv_close((uv_handle_t*)&tty, NULL); 52 | 53 | uv_run(loop); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/MSVSToolFile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.4 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | """Visual Studio project reader/writer.""" 8 | 9 | import common 10 | import gyp.easy_xml as easy_xml 11 | 12 | 13 | class Writer(object): 14 | """Visual Studio XML tool file writer.""" 15 | 16 | def __init__(self, tool_file_path, name): 17 | """Initializes the tool file. 18 | 19 | Args: 20 | tool_file_path: Path to the tool file. 21 | name: Name of the tool file. 22 | """ 23 | self.tool_file_path = tool_file_path 24 | self.name = name 25 | self.rules_section = ['Rules'] 26 | 27 | def AddCustomBuildRule(self, name, cmd, description, 28 | additional_dependencies, 29 | outputs, extensions): 30 | """Adds a rule to the tool file. 31 | 32 | Args: 33 | name: Name of the rule. 34 | description: Description of the rule. 35 | cmd: Command line of the rule. 36 | additional_dependencies: other files which may trigger the rule. 37 | outputs: outputs of the rule. 38 | extensions: extensions handled by the rule. 39 | """ 40 | rule = ['CustomBuildRule', 41 | {'Name': name, 42 | 'ExecutionDescription': description, 43 | 'CommandLine': cmd, 44 | 'Outputs': ';'.join(outputs), 45 | 'FileExtensions': ';'.join(extensions), 46 | 'AdditionalDependencies': 47 | ';'.join(additional_dependencies) 48 | }] 49 | self.rules_section.append(rule) 50 | 51 | def WriteIfChanged(self): 52 | """Writes the tool file.""" 53 | content = ['VisualStudioToolFile', 54 | {'Version': '8.00', 55 | 'Name': self.name 56 | }, 57 | self.rules_section 58 | ] 59 | easy_xml.WriteXmlIfChanged(content, self.tool_file_path, 60 | encoding="Windows-1252") 61 | -------------------------------------------------------------------------------- /deps/libdrizzle/win32/poll.h: -------------------------------------------------------------------------------- 1 | /* Header for poll(2) emulation 2 | Contributed by Paolo Bonzini. 3 | 4 | Copyright 2001, 2002, 2003, 2007 Free Software Foundation, Inc. 5 | 6 | This file is part of gnulib. 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU Lesser General Public License as published by 10 | the Free Software Foundation; either version 2, or (at your option) 11 | any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General Public License along 19 | with this program; if not, write to the Free Software Foundation, 20 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 21 | 22 | #ifndef _GL_POLL_H 23 | #define _GL_POLL_H 24 | 25 | /* fake a poll(2) environment */ 26 | #define POLLIN 0x0001 /* any readable data available */ 27 | #define POLLPRI 0x0002 /* OOB/Urgent readable data */ 28 | #define POLLOUT 0x0004 /* file descriptor is writeable */ 29 | #define POLLERR 0x0008 /* some poll error occurred */ 30 | #define POLLHUP 0x0010 /* file descriptor was "hung up" */ 31 | #define POLLNVAL 0x0020 /* requested events "invalid" */ 32 | #define POLLRDNORM 0x0040 33 | #define POLLRDBAND 0x0080 34 | #define POLLWRNORM 0x0100 35 | #define POLLWRBAND 0x0200 36 | 37 | struct pollfd 38 | { 39 | int fd; /* which file descriptor to poll */ 40 | short events; /* events we are interested in */ 41 | short revents; /* events found on return */ 42 | }; 43 | 44 | typedef unsigned long nfds_t; 45 | 46 | extern int poll (struct pollfd *pfd, nfds_t nfd, int timeout); 47 | 48 | /* Define INFTIM only if doing so conforms to POSIX. */ 49 | #if !defined (_POSIX_C_SOURCE) && !defined (_XOPEN_SOURCE) 50 | #define INFTIM (-1) 51 | #endif 52 | 53 | #endif /* _GL_POLL_H */ 54 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_better_malloc.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | AC_ARG_ENABLE([umem], 10 | [AS_HELP_STRING([--enable-umem], 11 | [Enable linking with libumem @<:@default=off@:>@])], 12 | [ac_enable_umem="$enableval"],[ 13 | case "$target_os" in 14 | *solaris*) 15 | ac_enable_umem="yes" 16 | ;; 17 | *) 18 | ac_enable_umem="no" 19 | ;; 20 | esac 21 | ]) 22 | 23 | AC_ARG_ENABLE([tcmalloc], 24 | [AS_HELP_STRING([--enable-tcmalloc], 25 | [Enable linking with tcmalloc @<:@default=off@:>@])], 26 | [ac_enable_tcmalloc="$enableval"], 27 | [ac_enable_tcmalloc="no"]) 28 | 29 | AC_ARG_ENABLE([mtmalloc], 30 | [AS_HELP_STRING([--disable-mtmalloc], 31 | [Enable linking with mtmalloc @<:@default=on@:>@])], 32 | [ac_enable_mtmalloc="$enableval"], 33 | [ac_enable_mtmalloc="yes"]) 34 | 35 | save_LIBS="${LIBS}" 36 | LIBS= 37 | AS_IF([test "x$ac_enable_umem" = "xyes"],[ 38 | AC_CHECK_LIB(umem,malloc,[],[]) 39 | ],[ 40 | case "$target_os" in 41 | *linux*) 42 | AS_IF([test "x$ac_enable_tcmalloc" != "xno"],[ 43 | AC_CHECK_LIB(tcmalloc-minimal,malloc,[],[]) 44 | AS_IF([test "x$ac_cv_lib_tcmalloc_minimal_malloc" != "xyes"],[ 45 | AC_CHECK_LIB(tcmalloc,malloc,[],[]) 46 | ]) 47 | ]) 48 | ;; 49 | *solaris*) 50 | AS_IF([test "x$ac_enable_mtmalloc" != "xno"],[ 51 | AC_CHECK_LIB(mtmalloc,malloc,[],[]) 52 | ]) 53 | ;; 54 | esac 55 | ]) 56 | BETTER_MALLOC_LIBS="${LIBS}" 57 | LIBS="${save_LIBS}" 58 | AC_SUBST([BETTER_MALLOC_LIBS]) 59 | 60 | ]) 61 | 62 | AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[ 63 | AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC]) 64 | LIBS="${LIBS} ${BETTER_MALLOC_LIBS}" 65 | ]) 66 | 67 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_writev.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | 20 | #ifdef HAVE_LIMITS_H 21 | # include 22 | #endif 23 | 24 | #include "ares.h" 25 | #include "ares_private.h" 26 | 27 | #ifndef HAVE_WRITEV 28 | ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt) 29 | { 30 | char *buffer, *bp; 31 | int i; 32 | size_t bytes = 0; 33 | ssize_t result; 34 | 35 | /* Validate iovcnt */ 36 | if (iovcnt <= 0) 37 | { 38 | SET_ERRNO(EINVAL); 39 | return (-1); 40 | } 41 | 42 | /* Validate and find the sum of the iov_len values in the iov array */ 43 | for (i = 0; i < iovcnt; i++) 44 | { 45 | if (iov[i].iov_len > INT_MAX - bytes) 46 | { 47 | SET_ERRNO(EINVAL); 48 | return (-1); 49 | } 50 | bytes += iov[i].iov_len; 51 | } 52 | 53 | if (bytes == 0) 54 | return (0); 55 | 56 | /* Allocate a temporary buffer to hold the data */ 57 | buffer = malloc(bytes); 58 | if (!buffer) 59 | { 60 | SET_ERRNO(ENOMEM); 61 | return (-1); 62 | } 63 | 64 | /* Copy the data into buffer */ 65 | for (bp = buffer, i = 0; i < iovcnt; ++i) 66 | { 67 | memcpy (bp, iov[i].iov_base, iov[i].iov_len); 68 | bp += iov[i].iov_len; 69 | } 70 | 71 | /* Send buffer contents */ 72 | result = swrite(s, buffer, bytes); 73 | 74 | free(buffer); 75 | 76 | return (result); 77 | } 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /deps/libdrizzle/tests/drizzle_column_st.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Drizzle Client & Protocol Library 3 | * 4 | * Copyright (C) 2008 Eric Day (eday@oddments.org) 5 | * All rights reserved. 6 | * 7 | * Use and distribution licensed under the BSD license. See 8 | * the COPYING file in this directory for full text. 9 | */ 10 | 11 | /** 12 | * @file 13 | * @brief drizzle_column_st tests 14 | */ 15 | 16 | #include "tests/common.h" 17 | 18 | int main(void) 19 | { 20 | drizzle_st *drizzle; 21 | drizzle_con_st *con; 22 | drizzle_result_st *result; 23 | drizzle_column_st *column; 24 | drizzle_column_st column_buffer; 25 | 26 | printf("sizeof(drizzle_column_st) = %zu\n", sizeof(drizzle_column_st)); 27 | 28 | drizzle_test("drizzle_create"); 29 | if ((drizzle= drizzle_create(NULL)) == NULL) 30 | drizzle_test_error("returned NULL"); 31 | 32 | drizzle_test("drizzle_con_create"); 33 | if ((con= drizzle_con_create(drizzle, NULL)) == NULL) 34 | drizzle_test_error("returned NULL"); 35 | 36 | drizzle_test("drizzle_result_create"); 37 | if ((result= drizzle_result_create(con, NULL)) == NULL) 38 | drizzle_test_error("returned NULL"); 39 | 40 | drizzle_test("drizzle_column_create buffer"); 41 | if ((column= drizzle_column_create(result, &column_buffer)) == NULL) 42 | drizzle_test_error("returned NULL"); 43 | drizzle_column_free(column); 44 | 45 | drizzle_test("drizzle_column_create"); 46 | if ((column= drizzle_column_create(result, NULL)) == NULL) 47 | drizzle_test_error("returned NULL"); 48 | 49 | drizzle_test("drizzle_column_set_catalog"); 50 | drizzle_column_set_catalog(column, "simple test"); 51 | 52 | drizzle_test("drizzle_column_catalog"); 53 | if (strcmp(drizzle_column_catalog(column), "simple test")) 54 | drizzle_test_error("does not match what was set"); 55 | 56 | drizzle_test("drizzle_column_free"); 57 | drizzle_column_free(column); 58 | 59 | drizzle_test("drizzle_result_free"); 60 | drizzle_result_free(result); 61 | 62 | drizzle_test("drizzle_con_free"); 63 | drizzle_con_free(con); 64 | 65 | drizzle_test("drizzle_free"); 66 | drizzle_free(drizzle); 67 | 68 | return 0; 69 | } 70 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_strerror.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | #include 19 | #include "ares.h" 20 | 21 | const char *ares_strerror(int code) 22 | { 23 | /* Return a string literal from a table. */ 24 | const char *errtext[] = { 25 | "Successful completion", 26 | "DNS server returned answer with no data", 27 | "DNS server claims query was misformatted", 28 | "DNS server returned general failure", 29 | "Domain name not found", 30 | "DNS server does not implement requested operation", 31 | "DNS server refused query", 32 | "Misformatted DNS query", 33 | "Misformatted domain name", 34 | "Unsupported address family", 35 | "Misformatted DNS reply", 36 | "Could not contact DNS servers", 37 | "Timeout while contacting DNS servers", 38 | "End of file", 39 | "Error reading file", 40 | "Out of memory", 41 | "Channel is being destroyed", 42 | "Misformatted string", 43 | "Illegal flags specified", 44 | "Given hostname is not numeric", 45 | "Illegal hints flags specified", 46 | "c-ares library initialization not yet performed", 47 | "Error loading iphlpapi.dll", 48 | "Could not find GetNetworkParams function", 49 | "DNS query cancelled" 50 | }; 51 | 52 | if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext))) 53 | return errtext[code]; 54 | else 55 | return "unknown"; 56 | } 57 | -------------------------------------------------------------------------------- /deps/libdrizzle/win32/alloca.h: -------------------------------------------------------------------------------- 1 | /* Memory allocation on the stack. 2 | 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software 4 | Foundation, Inc. 5 | 6 | This program is free software; you can redistribute it and/or modify it 7 | under the terms of the GNU Lesser General Public License as published 8 | by the Free Software Foundation; either version 2, or (at your option) 9 | any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | USA. */ 20 | 21 | /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H 22 | means there is a real alloca function. */ 23 | #ifndef _GL_ALLOCA_H 24 | #define _GL_ALLOCA_H 25 | 26 | /* alloca (N) returns a pointer to N bytes of memory 27 | allocated on the stack, which will last until the function returns. 28 | Use of alloca should be avoided: 29 | - inside arguments of function calls - undefined behaviour, 30 | - in inline functions - the allocation may actually last until the 31 | calling function returns, 32 | - for huge N (say, N >= 65536) - you never know how large (or small) 33 | the stack is, and when the stack cannot fulfill the memory allocation 34 | request, the program just crashes. 35 | */ 36 | 37 | #ifndef alloca 38 | # ifdef __GNUC__ 39 | # define alloca __builtin_alloca 40 | # elif defined _AIX 41 | # define alloca __alloca 42 | # elif defined _MSC_VER 43 | # include 44 | # define alloca _alloca 45 | # elif defined __DECC && defined __VMS 46 | # define alloca __ALLOCA 47 | # else 48 | # include 49 | # ifdef __cplusplus 50 | extern "C" 51 | # endif 52 | void *alloca (size_t); 53 | # endif 54 | #endif 55 | 56 | #endif /* _GL_ALLOCA_H */ 57 | -------------------------------------------------------------------------------- /deps/libuv/test/benchmark-sizes.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "task.h" 23 | #include "uv.h" 24 | 25 | 26 | BENCHMARK_IMPL(sizes) { 27 | LOGF("uv_shutdown_t: %u bytes\n", (unsigned int) sizeof(uv_shutdown_t)); 28 | LOGF("uv_write_t: %u bytes\n", (unsigned int) sizeof(uv_write_t)); 29 | LOGF("uv_connect_t: %u bytes\n", (unsigned int) sizeof(uv_connect_t)); 30 | LOGF("uv_tcp_t: %u bytes\n", (unsigned int) sizeof(uv_tcp_t)); 31 | LOGF("uv_pipe_t: %u bytes\n", (unsigned int) sizeof(uv_pipe_t)); 32 | LOGF("uv_prepare_t: %u bytes\n", (unsigned int) sizeof(uv_prepare_t)); 33 | LOGF("uv_check_t: %u bytes\n", (unsigned int) sizeof(uv_check_t)); 34 | LOGF("uv_idle_t: %u bytes\n", (unsigned int) sizeof(uv_idle_t)); 35 | LOGF("uv_async_t: %u bytes\n", (unsigned int) sizeof(uv_async_t)); 36 | LOGF("uv_timer_t: %u bytes\n", (unsigned int) sizeof(uv_timer_t)); 37 | LOGF("uv_process_t: %u bytes\n", (unsigned int) sizeof(uv_process_t)); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_print_callstack.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | dnl Try to define a macro to dump the current callstack. 7 | AC_DEFUN([PANDORA_PRINT_CALLSTACK],[ 8 | AC_CHECK_HEADERS([ucontext.h]) 9 | AS_IF([test "x$ac_cv_header_ucontext_h" = "xyes"], 10 | [ AC_CHECK_FUNCS([printstack]) ]) 11 | 12 | 13 | AS_IF([ test "x$ac_cv_func_printstack" != "xyes"], 14 | [ AC_CHECK_HEADERS([dlfcn.h]) 15 | AC_CHECK_HEADERS([execinfo.h]) 16 | AC_CHECK_FUNCS([backtrace]) 17 | AC_CHECK_FUNCS([backtrace_symbols_fd]) ]) 18 | 19 | AH_BOTTOM([ 20 | #ifdef __cplusplus 21 | #include 22 | #define PANDORA_PRINTSTACK_STD_PREFIX std:: 23 | #else 24 | #include 25 | #define PANDORA_PRINTSTACK_STD_PREFIX 26 | #endif 27 | 28 | #if defined(HAVE_UCONTEXT_H) && defined(HAVE_PRINTSTACK) 29 | #include 30 | #define pandora_print_callstack(a) \ 31 | printstack(PANDORA_PRINTSTACK_STD_PREFIX fileno(a)) 32 | #elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS_FD) 33 | 34 | #include 35 | 36 | #define pandora_print_callstack(a) \ 37 | { \ 38 | void *stack[100]; \ 39 | int depth = backtrace(stack, 100); \ 40 | backtrace_symbols_fd(stack, depth, PANDORA_PRINTSTACK_STD_PREFIX fileno(a)); \ 41 | } 42 | #elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && !defined(HAVE_BACKTRACE_SYMBOLS_FD) 43 | 44 | #include 45 | 46 | #define pandora_print_callstack(a) \ 47 | { \ 48 | void *stack[100]; \ 49 | int depth= backtrace(stack, 100); \ 50 | char **symbol= backtrace_symbols(stack, depth); \ 51 | for (int x= 0; x < size; ++x) \ 52 | PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, "%s\n", symbol[x]); \ 53 | } 54 | #else 55 | #define pandora_print_callstack(a) \ 56 | PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, \ 57 | "Stackdump not supported for this platform\n"); 58 | #endif 59 | ]) 60 | 61 | ]) 62 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/eio/LICENSE: -------------------------------------------------------------------------------- 1 | All files in libeio are Copyright (C)2007,2008 Marc Alexander Lehmann. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following 12 | disclaimer in the documentation and/or other materials provided 13 | with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | Alternatively, the contents of this package may be used under the terms 28 | of the GNU General Public License ("GPL") version 2 or any later version, 29 | in which case the provisions of the GPL are applicable instead of the 30 | above. If you wish to allow the use of your version of this package only 31 | under the terms of the GPL and not to allow others to use your version of 32 | this file under the BSD license, indicate your decision by deleting the 33 | provisions above and replace them with the notice and other provisions 34 | required by the GPL in this and the other files of this package. If you do 35 | not delete the provisions above, a recipient may use your version of this 36 | file under either the BSD or the GPL. 37 | -------------------------------------------------------------------------------- /deps/libuv/src/unix/ev/LICENSE: -------------------------------------------------------------------------------- 1 | All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following 12 | disclaimer in the documentation and/or other materials provided 13 | with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | Alternatively, the contents of this package may be used under the terms 28 | of the GNU General Public License ("GPL") version 2 or any later version, 29 | in which case the provisions of the GPL are applicable instead of the 30 | above. If you wish to allow the use of your version of this package only 31 | under the terms of the GPL and not to allow others to use your version of 32 | this file under the BSD license, indicate your decision by deleting the 33 | provisions above and replace them with the notice and other provisions 34 | required by the GPL in this and the other files of this package. If you do 35 | not delete the provisions above, a recipient may use your version of this 36 | file under either the BSD or the GPL. 37 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libtokyocabinet.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | dnl Provides support for finding libtokyocabinet. 7 | dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET 8 | 9 | AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[ 10 | AC_REQUIRE([AC_LIB_PREFIX]) 11 | 12 | dnl -------------------------------------------------------------------- 13 | dnl Check for libtokyocabinet 14 | dnl -------------------------------------------------------------------- 15 | 16 | AC_ARG_ENABLE([libtokyocabinet], 17 | [AS_HELP_STRING([--disable-libtokyocabinet], 18 | [Build with libtokyocabinet support @<:@default=on@:>@])], 19 | [ac_enable_libtokyocabinet="$enableval"], 20 | [ac_enable_libtokyocabinet="yes"]) 21 | 22 | AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[ 23 | AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[ 24 | #include 25 | #include 26 | ],[ 27 | const char *test= tcversion; 28 | bool ret= tcadboptimize(NULL, "params"); 29 | ]) 30 | ],[ 31 | ac_cv_libtokyocabinet="no" 32 | ]) 33 | 34 | AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[ 35 | 36 | PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet >= 1.4.15], [ 37 | ac_cv_libtokyocabinet=yes 38 | LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS} 39 | LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS} 40 | ],[test x = y]) 41 | ]) 42 | 43 | AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"]) 44 | ]) 45 | 46 | AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[ 47 | AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) 48 | ]) 49 | 50 | AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[ 51 | AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET]) 52 | AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"], 53 | AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.])) 54 | ]) 55 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libinnodb.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBINNODB],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libinnodb 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libinnodb], 14 | [AS_HELP_STRING([--disable-libinnodb], 15 | [Build with libinnodb support @<:@default=on@:>@])], 16 | [ac_enable_libinnodb="$enableval"], 17 | [ac_enable_libinnodb="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(innodb,,[ 21 | #include 22 | ],[ 23 | ib_u64_t 24 | ib_api_version(void); 25 | ]) 26 | ],[ 27 | ac_cv_libinnodb="no" 28 | ]) 29 | 30 | 31 | AC_CACHE_CHECK([if libinnodb is recent enough], 32 | [ac_cv_recent_innodb_h],[ 33 | save_LIBS=${LIBS} 34 | LIBS="${LIBS} ${LTLIBINNODB}" 35 | AC_LINK_IFELSE( 36 | [AC_LANG_PROGRAM([[ 37 | #include 38 | ]],[[ 39 | /* Make sure we have the two-arg version */ 40 | ib_table_drop(NULL, "nothing"); 41 | ]])],[ 42 | ac_cv_recent_innodb_h=yes 43 | ],[ 44 | ac_cv_recent_innodb_h=no 45 | ]) 46 | LIBS="${save_LIBS}" 47 | ]) 48 | AS_IF([test "x${ac_cv_recent_innodb_h}" = "xno"],[ 49 | AC_MSG_WARN([${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB]) 50 | ac_cv_libinnodb=no 51 | ]) 52 | 53 | AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"]) 54 | ]) 55 | 56 | AC_DEFUN([PANDORA_HAVE_LIBINNODB],[ 57 | AC_REQUIRE([_PANDORA_SEARCH_LIBINNODB]) 58 | ]) 59 | 60 | AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[ 61 | AC_REQUIRE([PANDORA_HAVE_LIBINNODB]) 62 | AS_IF([test "x${ac_cv_libinnodb}" = "xno"], 63 | AC_MSG_ERROR([libinnodb is required for ${PACKAGE}])) 64 | ]) 65 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_shared_ptr.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | dnl We check two things: where is the memory include file, and in what 7 | dnl namespace does shared_ptr reside. 8 | dnl We include AC_COMPILE_IFELSE for all the combinations we've seen in the 9 | dnl wild: 10 | dnl 11 | dnl GCC 4.3: namespace: std:: #include 12 | dnl GCC 4.2: namespace: tr1:: #include 13 | dnl GCC 4.2: namespace: boost:: #include 14 | dnl 15 | dnl We define one of HAVE_HAVE_TR1_SHARED_PTR or HAVE_BOOST_SHARED_PTR 16 | dnl depending on location, and SHARED_PTR_NAMESPACE to be the namespace in 17 | dnl which shared_ptr is defined. 18 | dnl 19 | 20 | AC_DEFUN([PANDORA_SHARED_PTR],[ 21 | AC_REQUIRE([PANDORA_CHECK_CXX_STANDARD]) 22 | AC_LANG_PUSH(C++) 23 | save_CXXFLAGS="${CXXFLAGS}" 24 | CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" 25 | AC_CHECK_HEADERS(memory tr1/memory boost/shared_ptr.hpp) 26 | AC_CACHE_CHECK([the location of shared_ptr header file], 27 | [ac_cv_shared_ptr_h],[ 28 | for namespace in std tr1 std::tr1 boost 29 | do 30 | AC_COMPILE_IFELSE( 31 | [AC_LANG_PROGRAM([[ 32 | #if defined(HAVE_MEMORY) 33 | # include 34 | #endif 35 | #if defined(HAVE_TR1_MEMORY) 36 | # include 37 | #endif 38 | #if defined(HAVE_BOOST_SHARED_PTR_HPP) 39 | # include 40 | #endif 41 | #include 42 | 43 | using $namespace::shared_ptr; 44 | using namespace std; 45 | ]],[[ 46 | shared_ptr test_ptr(new string("test string")); 47 | ]])], 48 | [ 49 | ac_cv_shared_ptr_namespace="${namespace}" 50 | break 51 | ],[ac_cv_shared_ptr_namespace=missing]) 52 | done 53 | ]) 54 | AC_DEFINE_UNQUOTED([SHARED_PTR_NAMESPACE], 55 | ${ac_cv_shared_ptr_namespace}, 56 | [The namespace in which SHARED_PTR can be found]) 57 | CXXFLAGS="${save_CXXFLAGS}" 58 | AC_LANG_POP() 59 | ]) 60 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libpcre.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for libpcre 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[ 12 | AC_REQUIRE([AC_LIB_PREFIX]) 13 | 14 | AC_LIB_HAVE_LINKFLAGS(pcre,, 15 | [#include ], 16 | [ 17 | pcre *re= NULL; 18 | pcre_version(); 19 | ]) 20 | AS_IF([test "x$ac_cv_libpcre" = "xno"], 21 | [ 22 | unset ac_cv_libpcre 23 | unset HAVE_LIBPCRE 24 | unset LIBPCRE 25 | unset LIBPCRE_PREFIX 26 | unset LTLIBPCRE 27 | AC_LIB_HAVE_LINKFLAGS(pcre,, 28 | [#include ], 29 | [ 30 | pcre *re= NULL; 31 | pcre_version(); 32 | ]) 33 | AS_IF([test "x$ac_cv_libpcre" = "xyes"], [ 34 | ac_cv_pcre_location="" 35 | ]) 36 | ],[ 37 | ac_cv_pcre_location="" 38 | ]) 39 | 40 | AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"]) 41 | ]) 42 | 43 | AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[ 44 | 45 | AC_ARG_ENABLE([libpcre], 46 | [AS_HELP_STRING([--disable-libpcre], 47 | [Build with libpcre support @<:@default=on@:>@])], 48 | [ac_enable_libpcre="$enableval"], 49 | [ac_enable_libpcre="yes"]) 50 | 51 | _PANDORA_SEARCH_LIBPCRE 52 | ]) 53 | 54 | 55 | AC_DEFUN([PANDORA_HAVE_LIBPCRE],[ 56 | AC_REQUIRE([_PANDORA_HAVE_LIBPCRE]) 57 | ]) 58 | 59 | AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[ 60 | ac_enable_libpcre="yes" 61 | _PANDORA_SEARCH_LIBPCRE 62 | 63 | AS_IF([test x$ac_cv_libpcre = xno],[ 64 | AC_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.]) 65 | ],[ 66 | AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}], 67 | [Location of pcre header]) 68 | ]) 69 | ]) 70 | 71 | AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[ 72 | AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE]) 73 | ]) 74 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libdrizzle.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBDRIZZLE],[ 7 | AC_REQUIRE([AC_LIB_PREFIX]) 8 | 9 | dnl -------------------------------------------------------------------- 10 | dnl Check for libdrizzle 11 | dnl -------------------------------------------------------------------- 12 | 13 | AC_ARG_ENABLE([libdrizzle], 14 | [AS_HELP_STRING([--disable-libdrizzle], 15 | [Build with libdrizzle support @<:@default=on@:>@])], 16 | [ac_enable_libdrizzle="$enableval"], 17 | [ac_enable_libdrizzle="yes"]) 18 | 19 | AS_IF([test "x$ac_enable_libdrizzle" = "xyes"],[ 20 | AC_LIB_HAVE_LINKFLAGS(drizzle,,[ 21 | #include 22 | ],[ 23 | drizzle_st drizzle; 24 | drizzle_version(); 25 | ]) 26 | ],[ 27 | ac_cv_libdrizzle="no" 28 | ]) 29 | 30 | AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) 31 | ]) 32 | 33 | AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[ 34 | AC_REQUIRE([_PANDORA_SEARCH_LIBDRIZZLE]) 35 | ]) 36 | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ 38 | AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) 39 | AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[ 40 | AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]) 41 | ],[ 42 | dnl We need at least 0.8 on Solaris non-sparc 43 | AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[ 44 | PANDORA_LIBDRIZZLE_RECENT 45 | ]) 46 | ]) 47 | ]) 48 | 49 | AC_DEFUN([PANDORA_LIBDRIZZLE_RECENT],[ 50 | AC_CACHE_CHECK([if libdrizzle is recent enough], 51 | [pandora_cv_libdrizzle_recent], 52 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 53 | #include 54 | drizzle_con_options_t foo= DRIZZLE_CON_EXPERIMENTAL; 55 | ]])], 56 | [pandora_cv_libdrizzle_recent=yes], 57 | [pandora_cv_libdrizzle_recent=no])]) 58 | AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[ 59 | AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8]) 60 | ]) 61 | ]) 62 | -------------------------------------------------------------------------------- /deps/http_parser/http_parser.gyp: -------------------------------------------------------------------------------- 1 | # This file is used with the GYP meta build system. 2 | # http://code.google.com/p/gyp/ 3 | # To build try this: 4 | # svn co http://gyp.googlecode.com/svn/trunk gyp 5 | # ./gyp/gyp -f make --depth=`pwd` http_parser.gyp 6 | # ./out/Debug/test 7 | { 8 | 'target_defaults': { 9 | 'default_configuration': 'Debug', 10 | 'configurations': { 11 | # TODO: hoist these out and put them somewhere common, because 12 | # RuntimeLibrary MUST MATCH across the entire project 13 | 'Debug': { 14 | 'defines': [ 'DEBUG', '_DEBUG' ], 15 | 'msvs_settings': { 16 | 'VCCLCompilerTool': { 17 | 'RuntimeLibrary': 1, # static debug 18 | }, 19 | }, 20 | }, 21 | 'Release': { 22 | 'defines': [ 'NDEBUG' ], 23 | 'msvs_settings': { 24 | 'VCCLCompilerTool': { 25 | 'RuntimeLibrary': 0, # static release 26 | }, 27 | }, 28 | } 29 | }, 30 | 'msvs_settings': { 31 | 'VCCLCompilerTool': { 32 | }, 33 | 'VCLibrarianTool': { 34 | }, 35 | 'VCLinkerTool': { 36 | 'GenerateDebugInformation': 'true', 37 | }, 38 | }, 39 | 'conditions': [ 40 | ['OS == "win"', { 41 | 'defines': [ 42 | 'WIN32' 43 | ], 44 | }] 45 | ], 46 | }, 47 | 48 | 'targets': [ 49 | { 50 | 'target_name': 'http_parser', 51 | 'type': 'static_library', 52 | 'include_dirs': [ '.' ], 53 | 'direct_dependent_settings': { 54 | 'include_dirs': [ '.' ], 55 | }, 56 | 'defines': [ 'HTTP_PARSER_STRICT=0' ], 57 | 'sources': [ './http_parser.c', ], 58 | 'conditions': [ 59 | ['OS=="win"', { 60 | 'msvs_settings': { 61 | 'VCCLCompilerTool': { 62 | # Compile as C++. http_parser.c is actually C99, but C++ is 63 | # close enough in this case. 64 | 'CompileAs': 2, 65 | }, 66 | }, 67 | }] 68 | ], 69 | }, 70 | 71 | { 72 | 'target_name': 'test', 73 | 'type': 'executable', 74 | 'dependencies': [ 'http_parser' ], 75 | 'sources': [ 'test.c' ] 76 | } 77 | ] 78 | } 79 | 80 | -------------------------------------------------------------------------------- /deps/libdrizzle/m4/pandora_have_libldap.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (C) 2009 Sun Microsystems 2 | dnl This file is free software; Sun Microsystems 3 | dnl gives unlimited permission to copy and/or distribute it, 4 | dnl with or without modifications, as long as this notice is preserved. 5 | 6 | #-------------------------------------------------------------------- 7 | # Check for libldap 8 | #-------------------------------------------------------------------- 9 | 10 | 11 | AC_DEFUN([_PANDORA_SEARCH_LIBLDAP],[ 12 | AC_REQUIRE([AC_LIB_PREFIX]) 13 | 14 | AC_LIB_HAVE_LINKFLAGS(ldap,, 15 | [#include ], 16 | [ 17 | LDAP *ldap; 18 | ldap_initialize(&ldap, "ldap://localhost/"); 19 | ]) 20 | AS_IF([test "x$ac_cv_libldap" = "xno"], 21 | [ 22 | unset ac_cv_libldap 23 | unset HAVE_LIBLDAP 24 | unset LIBLDAP 25 | unset LIBLDAP_PREFIX 26 | unset LTLIBLDAP 27 | AC_LIB_HAVE_LINKFLAGS(ldap,, 28 | [#include ], 29 | [ 30 | LDAP *ldap; 31 | ldap_initialize(&ldap, "ldap://localhost/"); 32 | ]) 33 | AS_IF([test "x$ac_cv_libldap" = "xyes"], [ 34 | ac_cv_ldap_location="" 35 | ]) 36 | ],[ 37 | ac_cv_ldap_location="" 38 | ]) 39 | 40 | AM_CONDITIONAL(HAVE_LIBLDAP, [test "x${ac_cv_libldap}" = "xyes"]) 41 | ]) 42 | 43 | AC_DEFUN([_PANDORA_HAVE_LIBLDAP],[ 44 | 45 | AC_ARG_ENABLE([libldap], 46 | [AS_HELP_STRING([--disable-libldap], 47 | [Build with libldap support @<:@default=on@:>@])], 48 | [ac_enable_libldap="$enableval"], 49 | [ac_enable_libldap="yes"]) 50 | 51 | _PANDORA_SEARCH_LIBLDAP 52 | ]) 53 | 54 | 55 | AC_DEFUN([PANDORA_HAVE_LIBLDAP],[ 56 | AC_REQUIRE([_PANDORA_HAVE_LIBLDAP]) 57 | ]) 58 | 59 | AC_DEFUN([_PANDORA_REQUIRE_LIBLDAP],[ 60 | ac_enable_libldap="yes" 61 | _PANDORA_SEARCH_LIBLDAP 62 | 63 | AS_IF([test x$ac_cv_libldap = xno],[ 64 | AC_MSG_ERROR([libldap is required for ${PACKAGE}. On Debian this can be found in libldap2-dev. On RedHat this can be found in openldap-devel.]) 65 | ],[ 66 | AC_DEFINE_UNQUOTED(LDAP_HEADER,[${ac_cv_ldap_location}], 67 | [Location of ldap header]) 68 | ]) 69 | ]) 70 | 71 | AC_DEFUN([PANDORA_REQUIRE_LIBLDAP],[ 72 | AC_REQUIRE([_PANDORA_REQUIRE_LIBLDAP]) 73 | ]) 74 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_fds.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #ifdef HAVE_SYS_TIME_H 20 | #include 21 | #endif 22 | 23 | #include "ares.h" 24 | #include "ares_private.h" 25 | 26 | int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds) 27 | { 28 | struct server_state *server; 29 | ares_socket_t nfds; 30 | int i; 31 | 32 | /* Are there any active queries? */ 33 | int active_queries = !ares__is_list_empty(&(channel->all_queries)); 34 | 35 | nfds = 0; 36 | for (i = 0; i < channel->nservers; i++) 37 | { 38 | server = &channel->servers[i]; 39 | /* We only need to register interest in UDP sockets if we have 40 | * outstanding queries. 41 | */ 42 | if (active_queries && server->udp_socket != ARES_SOCKET_BAD) 43 | { 44 | FD_SET(server->udp_socket, read_fds); 45 | if (server->udp_socket >= nfds) 46 | nfds = server->udp_socket + 1; 47 | } 48 | /* We always register for TCP events, because we want to know 49 | * when the other side closes the connection, so we don't waste 50 | * time trying to use a broken connection. 51 | */ 52 | if (server->tcp_socket != ARES_SOCKET_BAD) 53 | { 54 | FD_SET(server->tcp_socket, read_fds); 55 | if (server->qhead) 56 | FD_SET(server->tcp_socket, write_fds); 57 | if (server->tcp_socket >= nfds) 58 | nfds = server->tcp_socket + 1; 59 | } 60 | } 61 | return (int)nfds; 62 | } 63 | -------------------------------------------------------------------------------- /deps/libuv/src/ares/ares_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef ARES_GETOPT_H 2 | #define ARES_GETOPT_H 3 | 4 | /* 5 | * Copyright (c) 1987-2001 The Regents of the University of California. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * 11 | * A. Redistributions of source code must retain the above copyright notice, 12 | * this list of conditions and the following disclaimer. 13 | * B. Redistributions in binary form must reproduce the above copyright notice, 14 | * this list of conditions and the following disclaimer in the documentation 15 | * and/or other materials provided with the distribution. 16 | * C. Neither the names of the copyright holders nor the names of its 17 | * contributors may be used to endorse or promote products derived from this 18 | * software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS 21 | * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 24 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | * POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | 34 | int ares_getopt(int nargc, char * const nargv[], const char *ostr); 35 | 36 | #undef optarg 37 | #undef optind 38 | #undef opterr 39 | #undef optopt 40 | #undef optreset 41 | 42 | #define optarg ares_optarg 43 | #define optind ares_optind 44 | #define opterr ares_opterr 45 | #define optopt ares_optopt 46 | #define optreset ares_optreset 47 | 48 | extern char *optarg; 49 | extern int optind; 50 | extern int opterr; 51 | extern int optopt; 52 | 53 | #endif /* ARES_GETOPT_H */ 54 | --------------------------------------------------------------------------------